diff options
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/interface.c | 1 | ||||
-rw-r--r-- | drivers/rtc/rtc-dev.c | 13 |
2 files changed, 13 insertions, 1 deletions
diff --git a/drivers/rtc/interface.c b/drivers/rtc/interface.c index 579cd667b16f..4783ec68fb3c 100644 --- a/drivers/rtc/interface.c +++ b/drivers/rtc/interface.c | |||
@@ -265,3 +265,4 @@ int rtc_irq_set_freq(struct class_device *class_dev, struct rtc_task *task, int | |||
265 | } | 265 | } |
266 | return err; | 266 | return err; |
267 | } | 267 | } |
268 | EXPORT_SYMBOL_GPL(rtc_irq_set_freq); | ||
diff --git a/drivers/rtc/rtc-dev.c b/drivers/rtc/rtc-dev.c index 583789c66cdb..3109865e8d73 100644 --- a/drivers/rtc/rtc-dev.c +++ b/drivers/rtc/rtc-dev.c | |||
@@ -214,7 +214,7 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, | |||
214 | struct rtc_wkalrm alarm; | 214 | struct rtc_wkalrm alarm; |
215 | void __user *uarg = (void __user *) arg; | 215 | void __user *uarg = (void __user *) arg; |
216 | 216 | ||
217 | /* check that the calles has appropriate permissions | 217 | /* check that the calling task has appropriate permissions |
218 | * for certain ioctls. doing this check here is useful | 218 | * for certain ioctls. doing this check here is useful |
219 | * to avoid duplicate code in each driver. | 219 | * to avoid duplicate code in each driver. |
220 | */ | 220 | */ |
@@ -299,6 +299,17 @@ static int rtc_dev_ioctl(struct inode *inode, struct file *file, | |||
299 | 299 | ||
300 | err = rtc_set_time(class_dev, &tm); | 300 | err = rtc_set_time(class_dev, &tm); |
301 | break; | 301 | break; |
302 | |||
303 | case RTC_IRQP_READ: | ||
304 | if (ops->irq_set_freq) | ||
305 | err = put_user(rtc->irq_freq, (unsigned long *) arg); | ||
306 | break; | ||
307 | |||
308 | case RTC_IRQP_SET: | ||
309 | if (ops->irq_set_freq) | ||
310 | err = rtc_irq_set_freq(class_dev, rtc->irq_task, arg); | ||
311 | break; | ||
312 | |||
302 | #if 0 | 313 | #if 0 |
303 | case RTC_EPOCH_SET: | 314 | case RTC_EPOCH_SET: |
304 | #ifndef rtc_epoch | 315 | #ifndef rtc_epoch |