From 4a649903f91232d02284d53724b0a45728111767 Mon Sep 17 00:00:00 2001 From: John Stultz Date: Tue, 6 Mar 2012 17:16:09 -0800 Subject: rtc: Provide flag for rtc devices that don't support UIE Richard Weinberger noticed that on some RTC hardware that doesn't support UIE mode, due to coarse granular alarms (like 1minute resolution), the current virtualized RTC support doesn't properly error out when UIE is enabled. Instead the current code queues an alarm for the next second, but it won't fire until up to a miniute later. This patch provides a generic way to flag this sort of hardware and fixes the issue on the mpc5121 where Richard noticed the problem. CC: stable@vger.kernel.org Reported-by: Richard Weinberger Tested-by: Richard Weinberger Signed-off-by: John Stultz --- drivers/rtc/rtc-mpc5121.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/rtc/rtc-mpc5121.c') diff --git a/drivers/rtc/rtc-mpc5121.c b/drivers/rtc/rtc-mpc5121.c index 9d3caccfc250..613447abdbe5 100644 --- a/drivers/rtc/rtc-mpc5121.c +++ b/drivers/rtc/rtc-mpc5121.c @@ -360,6 +360,8 @@ static int __devinit mpc5121_rtc_probe(struct platform_device *op) &mpc5200_rtc_ops, THIS_MODULE); } + rtc->rtc->uie_unsupported = 1; + if (IS_ERR(rtc->rtc)) { err = PTR_ERR(rtc->rtc); goto out_free_irq; -- cgit