diff options
Diffstat (limited to 'drivers/char/rtc.c')
-rw-r--r-- | drivers/char/rtc.c | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/char/rtc.c b/drivers/char/rtc.c index fa92a8af5a5a..dbefbb30ed44 100644 --- a/drivers/char/rtc.c +++ b/drivers/char/rtc.c | |||
@@ -78,9 +78,10 @@ | |||
78 | #include <linux/wait.h> | 78 | #include <linux/wait.h> |
79 | #include <linux/bcd.h> | 79 | #include <linux/bcd.h> |
80 | #include <linux/delay.h> | 80 | #include <linux/delay.h> |
81 | #include <linux/smp_lock.h> | ||
82 | #include <linux/uaccess.h> | ||
81 | 83 | ||
82 | #include <asm/current.h> | 84 | #include <asm/current.h> |
83 | #include <asm/uaccess.h> | ||
84 | #include <asm/system.h> | 85 | #include <asm/system.h> |
85 | 86 | ||
86 | #ifdef CONFIG_X86 | 87 | #ifdef CONFIG_X86 |
@@ -120,8 +121,6 @@ static irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id) | |||
120 | return 0; | 121 | return 0; |
121 | } | 122 | } |
122 | #endif | 123 | #endif |
123 | #else | ||
124 | extern irqreturn_t hpet_rtc_interrupt(int irq, void *dev_id); | ||
125 | #endif | 124 | #endif |
126 | 125 | ||
127 | /* | 126 | /* |
@@ -144,8 +143,7 @@ static DEFINE_TIMER(rtc_irq_timer, rtc_dropped_irq, 0, 0); | |||
144 | static ssize_t rtc_read(struct file *file, char __user *buf, | 143 | static ssize_t rtc_read(struct file *file, char __user *buf, |
145 | size_t count, loff_t *ppos); | 144 | size_t count, loff_t *ppos); |
146 | 145 | ||
147 | static int rtc_ioctl(struct inode *inode, struct file *file, | 146 | static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg); |
148 | unsigned int cmd, unsigned long arg); | ||
149 | 147 | ||
150 | #ifdef RTC_IRQ | 148 | #ifdef RTC_IRQ |
151 | static unsigned int rtc_poll(struct file *file, poll_table *wait); | 149 | static unsigned int rtc_poll(struct file *file, poll_table *wait); |
@@ -719,10 +717,13 @@ static int rtc_do_ioctl(unsigned int cmd, unsigned long arg, int kernel) | |||
719 | &wtime, sizeof wtime) ? -EFAULT : 0; | 717 | &wtime, sizeof wtime) ? -EFAULT : 0; |
720 | } | 718 | } |
721 | 719 | ||
722 | static int rtc_ioctl(struct inode *inode, struct file *file, unsigned int cmd, | 720 | static long rtc_ioctl(struct file *file, unsigned int cmd, unsigned long arg) |
723 | unsigned long arg) | ||
724 | { | 721 | { |
725 | return rtc_do_ioctl(cmd, arg, 0); | 722 | long ret; |
723 | lock_kernel(); | ||
724 | ret = rtc_do_ioctl(cmd, arg, 0); | ||
725 | unlock_kernel(); | ||
726 | return ret; | ||
726 | } | 727 | } |
727 | 728 | ||
728 | /* | 729 | /* |
@@ -915,7 +916,7 @@ static const struct file_operations rtc_fops = { | |||
915 | #ifdef RTC_IRQ | 916 | #ifdef RTC_IRQ |
916 | .poll = rtc_poll, | 917 | .poll = rtc_poll, |
917 | #endif | 918 | #endif |
918 | .ioctl = rtc_ioctl, | 919 | .unlocked_ioctl = rtc_ioctl, |
919 | .open = rtc_open, | 920 | .open = rtc_open, |
920 | .release = rtc_release, | 921 | .release = rtc_release, |
921 | .fasync = rtc_fasync, | 922 | .fasync = rtc_fasync, |