aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-m41t80.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-m41t80.c')
-rw-r--r--drivers/rtc/rtc-m41t80.c16
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 */
626static int wdt_ioctl(struct inode *inode, struct file *file, unsigned int cmd, 626static 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
679static 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,
736static const struct file_operations wdt_fops = { 748static 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,