diff options
author | Arnd Bergmann <arnd@arndb.de> | 2010-04-26 18:24:05 -0400 |
---|---|---|
committer | Frederic Weisbecker <fweisbec@gmail.com> | 2010-05-16 23:27:41 -0400 |
commit | 55929332c92e5d34d65a8f784604c92677ea3e15 (patch) | |
tree | 555e922d470336d07ace32bb564ac5358379a3c4 /drivers/input | |
parent | 703c631ebbcadcfd861d01e697fdda7c388fec9a (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/input')
-rw-r--r-- | drivers/input/misc/hp_sdc_rtc.c | 34 |
1 files changed, 24 insertions, 10 deletions
diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index ad730e15afc0..e00a1cc79c0a 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c | |||
@@ -43,6 +43,7 @@ | |||
43 | #include <linux/proc_fs.h> | 43 | #include <linux/proc_fs.h> |
44 | #include <linux/poll.h> | 44 | #include <linux/poll.h> |
45 | #include <linux/rtc.h> | 45 | #include <linux/rtc.h> |
46 | #include <linux/smp_lock.h> | ||
46 | #include <linux/semaphore.h> | 47 | #include <linux/semaphore.h> |
47 | 48 | ||
48 | MODULE_AUTHOR("Brian S. Julin <bri@calyx.com>"); | 49 | MODULE_AUTHOR("Brian S. Julin <bri@calyx.com>"); |
@@ -64,8 +65,8 @@ static DECLARE_WAIT_QUEUE_HEAD(hp_sdc_rtc_wait); | |||
64 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, | 65 | static ssize_t hp_sdc_rtc_read(struct file *file, char __user *buf, |
65 | size_t count, loff_t *ppos); | 66 | size_t count, loff_t *ppos); |
66 | 67 | ||
67 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, | 68 | static long hp_sdc_rtc_unlocked_ioctl(struct file *file, |
68 | unsigned int cmd, unsigned long arg); | 69 | unsigned int cmd, unsigned long arg); |
69 | 70 | ||
70 | static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait); | 71 | static unsigned int hp_sdc_rtc_poll(struct file *file, poll_table *wait); |
71 | 72 | ||
@@ -512,7 +513,7 @@ static int hp_sdc_rtc_read_proc(char *page, char **start, off_t off, | |||
512 | return len; | 513 | return len; |
513 | } | 514 | } |
514 | 515 | ||
515 | static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, | 516 | static int hp_sdc_rtc_ioctl(struct file *file, |
516 | unsigned int cmd, unsigned long arg) | 517 | unsigned int cmd, unsigned long arg) |
517 | { | 518 | { |
518 | #if 1 | 519 | #if 1 |
@@ -659,14 +660,27 @@ static int hp_sdc_rtc_ioctl(struct inode *inode, struct file *file, | |||
659 | #endif | 660 | #endif |
660 | } | 661 | } |
661 | 662 | ||
663 | static long hp_sdc_rtc_unlocked_ioctl(struct file *file, | ||
664 | unsigned int cmd, unsigned long arg) | ||
665 | { | ||
666 | int ret; | ||
667 | |||
668 | lock_kernel(); | ||
669 | ret = hp_sdc_rtc_ioctl(file, cmd, arg); | ||
670 | unlock_kernel(); | ||
671 | |||
672 | return ret; | ||
673 | } | ||
674 | |||
675 | |||
662 | static const struct file_operations hp_sdc_rtc_fops = { | 676 | static const struct file_operations hp_sdc_rtc_fops = { |
663 | .owner = THIS_MODULE, | 677 | .owner = THIS_MODULE, |
664 | .llseek = no_llseek, | 678 | .llseek = no_llseek, |
665 | .read = hp_sdc_rtc_read, | 679 | .read = hp_sdc_rtc_read, |
666 | .poll = hp_sdc_rtc_poll, | 680 | .poll = hp_sdc_rtc_poll, |
667 | .ioctl = hp_sdc_rtc_ioctl, | 681 | .unlocked_ioctl = hp_sdc_rtc_ioctl, |
668 | .open = hp_sdc_rtc_open, | 682 | .open = hp_sdc_rtc_open, |
669 | .fasync = hp_sdc_rtc_fasync, | 683 | .fasync = hp_sdc_rtc_fasync, |
670 | }; | 684 | }; |
671 | 685 | ||
672 | static struct miscdevice hp_sdc_rtc_dev = { | 686 | static struct miscdevice hp_sdc_rtc_dev = { |