aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/ds1620.c
diff options
context:
space:
mode:
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 = {