aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-cmos.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2011-02-03 15:02:07 -0500
committerJohn Stultz <john.stultz@linaro.org>2011-03-09 14:23:35 -0500
commit696160fec162601d06940862b5b3aa4460344c1b (patch)
tree63c5d1d87f140b6a989256727b62071dd19d894b /drivers/rtc/rtc-cmos.c
parent80d4bb515b78f38738f3378fd1be6039063ab040 (diff)
RTC: Cleanup rtc_class_ops->irq_set_freq()
With the generic rtc code now emulating PIE mode irqs via an hrtimer, no one calls the rtc_class_ops->irq_set_freq call. This patch removes the hook and deletes the driver functions if no one else calls them. CC: Thomas Gleixner <tglx@linutronix.de> CC: Alessandro Zummo <a.zummo@towertech.it> CC: Marcelo Roberto Jimenez <mroberto@cpti.cetuc.puc-rio.br> CC: rtc-linux@googlegroups.com Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/rtc/rtc-cmos.c')
-rw-r--r--drivers/rtc/rtc-cmos.c26
1 files changed, 0 insertions, 26 deletions
diff --git a/drivers/rtc/rtc-cmos.c b/drivers/rtc/rtc-cmos.c
index de632e793d46..bdb1f8e2042a 100644
--- a/drivers/rtc/rtc-cmos.c
+++ b/drivers/rtc/rtc-cmos.c
@@ -375,31 +375,6 @@ static int cmos_set_alarm(struct device *dev, struct rtc_wkalrm *t)
375 return 0; 375 return 0;
376} 376}
377 377
378static int cmos_irq_set_freq(struct device *dev, int freq)
379{
380 struct cmos_rtc *cmos = dev_get_drvdata(dev);
381 int f;
382 unsigned long flags;
383
384 if (!is_valid_irq(cmos->irq))
385 return -ENXIO;
386
387 if (!is_power_of_2(freq))
388 return -EINVAL;
389 /* 0 = no irqs; 1 = 2^15 Hz ... 15 = 2^0 Hz */
390 f = ffs(freq);
391 if (f-- > 16)
392 return -EINVAL;
393 f = 16 - f;
394
395 spin_lock_irqsave(&rtc_lock, flags);
396 hpet_set_periodic_freq(freq);
397 CMOS_WRITE(RTC_REF_CLCK_32KHZ | f, RTC_FREQ_SELECT);
398 spin_unlock_irqrestore(&rtc_lock, flags);
399
400 return 0;
401}
402
403static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled) 378static int cmos_alarm_irq_enable(struct device *dev, unsigned int enabled)
404{ 379{
405 struct cmos_rtc *cmos = dev_get_drvdata(dev); 380 struct cmos_rtc *cmos = dev_get_drvdata(dev);
@@ -482,7 +457,6 @@ static const struct rtc_class_ops cmos_rtc_ops = {
482 .read_alarm = cmos_read_alarm, 457 .read_alarm = cmos_read_alarm,
483 .set_alarm = cmos_set_alarm, 458 .set_alarm = cmos_set_alarm,
484 .proc = cmos_procfs, 459 .proc = cmos_procfs,
485 .irq_set_freq = cmos_irq_set_freq,
486 .alarm_irq_enable = cmos_alarm_irq_enable, 460 .alarm_irq_enable = cmos_alarm_irq_enable,
487 .update_irq_enable = cmos_update_irq_enable, 461 .update_irq_enable = cmos_update_irq_enable,
488}; 462};