Skip to content

Commit 080c222

Browse files
arndbJonathan Corbet
authored andcommitted
ds1620: BKL pushdown
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 7ccef46 commit 080c222

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

‎drivers/char/ds1620.c‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <linux/proc_fs.h>
99
#include <linux/capability.h>
1010
#include <linux/init.h>
11+
#include <linux/smp_lock.h>
1112

1213
#include <asm/hardware.h>
1314
#include <asm/mach-types.h>
@@ -208,6 +209,12 @@ static void ds1620_read_state(struct therm *therm)
208209
therm->hi = cvt_9_to_int(ds1620_in(THERM_READ_TH, 9));
209210
}
210211

212+
static int ds1620_open(struct inode *inode, struct file *file)
213+
{
214+
cycle_kernel_lock();
215+
return nonseekable_open(inode, file);
216+
}
217+
211218
static ssize_t
212219
ds1620_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
213220
{
@@ -336,7 +343,7 @@ static struct proc_dir_entry *proc_therm_ds1620;
336343

337344
static const struct file_operations ds1620_fops = {
338345
.owner = THIS_MODULE,
339-
.open = nonseekable_open,
346+
.open = ds1620_open,
340347
.read = ds1620_read,
341348
.ioctl = ds1620_ioctl,
342349
};

0 commit comments

Comments
 (0)