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/rtc/rtc-m41t80.c | |
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/rtc/rtc-m41t80.c')
-rw-r--r-- | drivers/rtc/rtc-m41t80.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-m41t80.c b/drivers/rtc/rtc-m41t80.c index 60fe266f0f49..038095d99976 100644 --- a/drivers/rtc/rtc-m41t80.c +++ b/drivers/rtc/rtc-m41t80.c | |||
@@ -623,7 +623,7 @@ static ssize_t wdt_read(struct file *file, char __user *buf, | |||
623 | * according to their available features. We only actually usefully support | 623 | * according to their available features. We only actually usefully support |
624 | * querying capabilities and current status. | 624 | * querying capabilities and current status. |
625 | */ | 625 | */ |
626 | static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 626 | static int wdt_ioctl(struct file *file, unsigned int cmd, |
627 | unsigned long arg) | 627 | unsigned long arg) |
628 | { | 628 | { |
629 | int new_margin, rv; | 629 | int new_margin, rv; |
@@ -676,6 +676,18 @@ static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | |||
676 | return -ENOTTY; | 676 | return -ENOTTY; |
677 | } | 677 | } |
678 | 678 | ||
679 | static long wdt_unlocked_ioctl(struct file *file, unsigned int cmd, | ||
680 | unsigned long arg) | ||
681 | { | ||
682 | int ret; | ||
683 | |||
684 | lock_kernel(); | ||
685 | ret = wdt_ioctl(file, cmd, arg); | ||
686 | unlock_kernel(); | ||
687 | |||
688 | return ret; | ||
689 | } | ||
690 | |||
679 | /** | 691 | /** |
680 | * wdt_open: | 692 | * wdt_open: |
681 | * @inode: inode of device | 693 | * @inode: inode of device |
@@ -736,7 +748,7 @@ static int wdt_notify_sys(struct notifier_block *this, unsigned long code, | |||
736 | static const struct file_operations wdt_fops = { | 748 | static const struct file_operations wdt_fops = { |
737 | .owner = THIS_MODULE, | 749 | .owner = THIS_MODULE, |
738 | .read = wdt_read, | 750 | .read = wdt_read, |
739 | .ioctl = wdt_ioctl, | 751 | .unlocked_ioctl = wdt_unlocked_ioctl, |
740 | .write = wdt_write, | 752 | .write = wdt_write, |
741 | .open = wdt_open, | 753 | .open = wdt_open, |
742 | .release = wdt_release, | 754 | .release = wdt_release, |