diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-05-24 11:01:10 -0400 |
commit | f13771187b9423b824f32518319f6da85d819003 (patch) | |
tree | c431cf16c286065a302d5f3fb43fc1abac7e4047 /drivers/input | |
parent | 15953654cc312429740fd58fb37a5a3d63a54376 (diff) | |
parent | 9f37af654fda88a8dcca74c785f6c20e52758866 (diff) |
Merge branch 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing
* 'bkl/ioctl' of git://git.kernel.org/pub/scm/linux/kernel/git/frederic/random-tracing:
uml: Pushdown the bkl from harddog_kern ioctl
sunrpc: Pushdown the bkl from sunrpc cache ioctl
sunrpc: Pushdown the bkl from ioctl
autofs4: Pushdown the bkl from ioctl
uml: Convert to unlocked_ioctls to remove implicit BKL
ncpfs: BKL ioctl pushdown
coda: Clean-up whitespace problems in pioctl.c
coda: BKL ioctl pushdown
drivers: Push down BKL into various drivers
isdn: Push down BKL into ioctl functions
scsi: Push down BKL into ioctl functions
dvb: Push down BKL into ioctl functions
smbfs: Push down BKL into ioctl function
coda/psdev: Remove BKL from ioctl function
um/mmapper: Remove BKL usage
sn_hwperf: Kill BKL usage
hfsplus: Push down BKL into ioctl function
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 = { |