rtc: vr41xx: Wire up alarm_irq_enable
[pandora-kernel.git] / drivers / rtc / rtc-vr41xx.c
index 769190a..27da077 100644 (file)
@@ -207,36 +207,6 @@ static int vr41xx_rtc_set_alarm(struct device *dev, struct rtc_wkalrm *wkalrm)
        return 0;
 }
 
-static int vr41xx_rtc_irq_set_freq(struct device *dev, int freq)
-{
-       u64 count;
-
-       if (!is_power_of_2(freq))
-               return -EINVAL;
-       count = RTC_FREQUENCY;
-       do_div(count, freq);
-
-       spin_lock_irq(&rtc_lock);
-
-       periodic_count = count;
-       rtc1_write(RTCL1LREG, periodic_count);
-       rtc1_write(RTCL1HREG, periodic_count >> 16);
-
-       spin_unlock_irq(&rtc_lock);
-
-       return 0;
-}
-
-static int vr41xx_rtc_irq_set_state(struct device *dev, int enabled)
-{
-       if (enabled)
-               enable_irq(pie_irq);
-       else
-               disable_irq(pie_irq);
-
-       return 0;
-}
-
 static int vr41xx_rtc_ioctl(struct device *dev, unsigned int cmd, unsigned long arg)
 {
        switch (cmd) {
@@ -302,14 +272,13 @@ static irqreturn_t rtclong1_interrupt(int irq, void *dev_id)
 }
 
 static const struct rtc_class_ops vr41xx_rtc_ops = {
-       .release        = vr41xx_rtc_release,
-       .ioctl          = vr41xx_rtc_ioctl,
-       .read_time      = vr41xx_rtc_read_time,
-       .set_time       = vr41xx_rtc_set_time,
-       .read_alarm     = vr41xx_rtc_read_alarm,
-       .set_alarm      = vr41xx_rtc_set_alarm,
-       .irq_set_freq   = vr41xx_rtc_irq_set_freq,
-       .irq_set_state  = vr41xx_rtc_irq_set_state,
+       .release                = vr41xx_rtc_release,
+       .ioctl                  = vr41xx_rtc_ioctl,
+       .read_time              = vr41xx_rtc_read_time,
+       .set_time               = vr41xx_rtc_set_time,
+       .read_alarm             = vr41xx_rtc_read_alarm,
+       .set_alarm              = vr41xx_rtc_set_alarm,
+       .alarm_irq_enable       = vr41xx_rtc_alarm_irq_enable,
 };
 
 static int __devinit rtc_probe(struct platform_device *pdev)