~ubuntu-branches/ubuntu/precise/linux-lowlatency/precise-proposed

« back to all changes in this revision

Viewing changes to drivers/rtc/interface.c

  • Committer: Package Import Robot
  • Author(s): Luke Yelavich, Luke Yelavich, Upstream Kernel Changes
  • Date: 2012-04-04 18:49:36 UTC
  • Revision ID: package-import@ubuntu.com-20120404184936-tqu735914muv4wpg
Tags: 3.2.0-22.30
[ Luke Yelavich ]

* [Config] Update configs after rebase against Ubuntu-3.2.0-22.35

[ Upstream Kernel Changes ]

* Low-latency: Rebase against Ubuntu-3.2.0-22.35

Show diffs side-by-side

added added

removed removed

Lines of Context:
445
445
        if (rtc->uie_rtctimer.enabled == enabled)
446
446
                goto out;
447
447
 
 
448
        if (rtc->uie_unsupported) {
 
449
                err = -EINVAL;
 
450
                goto out;
 
451
        }
 
452
 
448
453
        if (enabled) {
449
454
                struct rtc_time tm;
450
455
                ktime_t now, onesec;
763
768
        return 0;
764
769
}
765
770
 
 
771
static void rtc_alarm_disable(struct rtc_device *rtc)
 
772
{
 
773
        if (!rtc->ops || !rtc->ops->alarm_irq_enable)
 
774
                return;
 
775
 
 
776
        rtc->ops->alarm_irq_enable(rtc->dev.parent, false);
 
777
}
 
778
 
766
779
/**
767
780
 * rtc_timer_remove - Removes a rtc_timer from the rtc_device timerqueue
768
781
 * @rtc rtc device
784
797
                struct rtc_wkalrm alarm;
785
798
                int err;
786
799
                next = timerqueue_getnext(&rtc->timerqueue);
787
 
                if (!next)
 
800
                if (!next) {
 
801
                        rtc_alarm_disable(rtc);
788
802
                        return;
 
803
                }
789
804
                alarm.time = rtc_ktime_to_tm(next->expires);
790
805
                alarm.enabled = 1;
791
806
                err = __rtc_set_alarm(rtc, &alarm);
847
862
                err = __rtc_set_alarm(rtc, &alarm);
848
863
                if (err == -ETIME)
849
864
                        goto again;
850
 
        }
 
865
        } else
 
866
                rtc_alarm_disable(rtc);
851
867
 
852
868
        mutex_unlock(&rtc->ops_lock);
853
869
}