aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ds1620.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2010-04-26 18:24:05 -0400
committerFrederic Weisbecker <fweisbec@gmail.com>2010-05-16 23:27:41 -0400
commit55929332c92e5d34d65a8f784604c92677ea3e15 (patch)
tree555e922d470336d07ace32bb564ac5358379a3c4 /drivers/char/ds1620.c
parent703c631ebbcadcfd861d01e697fdda7c388fec9a (diff)
drivers: Push down BKL into various drivers
These are the last remaining device drivers using the ->ioctl file operation in the drivers directory (except from v4l drivers). [fweisbec: drop i8k pushdown as it has been done from procfs pushdown branch already] Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Diffstat (limited to 'drivers/char/ds1620.c')
-rw-r--r--drivers/char/ds1620.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c
index 61f0146e215..dbee8688f75 100644
--- a/drivers/char/ds1620.c
+++ b/drivers/char/ds1620.c
@@ -232,7 +232,7 @@ ds1620_read(struct file *file, char __user *buf, size_t count, loff_t *ptr)
232} 232}
233 233
234static int 234static int
235ds1620_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) 235ds1620_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
236{ 236{
237 struct therm therm; 237 struct therm therm;
238 union { 238 union {
@@ -316,6 +316,18 @@ ds1620_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned
316 return 0; 316 return 0;
317} 317}
318 318
319static long
320ds1620_unlocked_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
321{
322 int ret;
323
324 lock_kernel();
325 ret = ds1620_ioctl(file, cmd, arg);
326 unlock_kernel();
327
328 return ret;
329}
330
319#ifdef THERM_USE_PROC 331#ifdef THERM_USE_PROC
320static int 332static int
321proc_therm_ds1620_read(char *buf, char **start, off_t offset, 333proc_therm_ds1620_read(char *buf, char **start, off_t offset,
@@ -344,7 +356,7 @@ static const struct file_operations ds1620_fops = {
344 .owner = THIS_MODULE, 356 .owner = THIS_MODULE,
345 .open = ds1620_open, 357 .open = ds1620_open,
346 .read = ds1620_read, 358 .read = ds1620_read,
347 .ioctl = ds1620_ioctl, 359 .unlocked_ioctl = ds1620_unlocked_ioctl,
348}; 360};
349 361
350static struct miscdevice ds1620_miscdev = { 362static struct miscdevice ds1620_miscdev = {