diff options
Diffstat (limited to 'drivers/char/ds1620.c')
-rw-r--r-- | drivers/char/ds1620.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/char/ds1620.c b/drivers/char/ds1620.c index 61f0146e215d..dbee8688f75c 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 | ||
234 | static int | 234 | static int |
235 | ds1620_ioctl(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg) | 235 | ds1620_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 | ||
319 | static long | ||
320 | ds1620_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 |
320 | static int | 332 | static int |
321 | proc_therm_ds1620_read(char *buf, char **start, off_t offset, | 333 | proc_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 | ||
350 | static struct miscdevice ds1620_miscdev = { | 362 | static struct miscdevice ds1620_miscdev = { |