aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/rtc/rtc-dev.c')
-rw-r--r--drivers/rtc/rtc-dev.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c
index 62227cd5241..d0e06edb14c 100644
--- a/drivers/rtc/rtc-dev.c
+++ b/drivers/rtc/rtc-dev.c
@@ -76,7 +76,7 @@ static void rtc_uie_task(struct work_struct *work)
76 } 76 }
77 spin_unlock_irq(&rtc->irq_lock); 77 spin_unlock_irq(&rtc->irq_lock);
78 if (num) 78 if (num)
79 rtc_update_irq(rtc, num, RTC_UF | RTC_IRQF); 79 rtc_handle_legacy_irq(rtc, num, RTC_UF);
80} 80}
81static void rtc_uie_timer(unsigned long data) 81static void rtc_uie_timer(unsigned long data)
82{ 82{
@@ -253,19 +253,7 @@ static long rtc_dev_ioctl(struct file *file,
253 if (err) 253 if (err)
254 goto done; 254 goto done;
255 255
256 /* try the driver's ioctl interface */ 256 /*
257 if (ops->ioctl) {
258 err = ops->ioctl(rtc->dev.parent, cmd, arg);
259 if (err != -ENOIOCTLCMD) {
260 mutex_unlock(&rtc->ops_lock);
261 return err;
262 }
263 }
264
265 /* if the driver does not provide the ioctl interface
266 * or if that particular ioctl was not implemented
267 * (-ENOIOCTLCMD), we will try to emulate here.
268 *
269 * Drivers *SHOULD NOT* provide ioctl implementations 257 * Drivers *SHOULD NOT* provide ioctl implementations
270 * for these requests. Instead, provide methods to 258 * for these requests. Instead, provide methods to
271 * support the following code, so that the RTC's main 259 * support the following code, so that the RTC's main
@@ -428,7 +416,12 @@ static long rtc_dev_ioctl(struct file *file,
428 return err; 416 return err;
429 417
430 default: 418 default:
431 err = -ENOTTY; 419 /* Finally try the driver's ioctl interface */
420 if (ops->ioctl) {
421 err = ops->ioctl(rtc->dev.parent, cmd, arg);
422 if (err == -ENOIOCTLCMD)
423 err = -ENOTTY;
424 }
432 break; 425 break;
433 } 426 }
434 427