diff options
-rw-r--r-- | drivers/rtc/rtc-wm8350.c | 7 | ||||
-rw-r--r-- | include/linux/mfd/wm8350/rtc.h | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c index a5512f515998..3d0dc76b38af 100644 --- a/drivers/rtc/rtc-wm8350.c +++ b/drivers/rtc/rtc-wm8350.c | |||
@@ -307,11 +307,18 @@ static int wm8350_rtc_update_irq_enable(struct device *dev, | |||
307 | { | 307 | { |
308 | struct wm8350 *wm8350 = dev_get_drvdata(dev); | 308 | struct wm8350 *wm8350 = dev_get_drvdata(dev); |
309 | 309 | ||
310 | /* Suppress duplicate changes since genirq nests enable and | ||
311 | * disable calls. */ | ||
312 | if (enabled == wm8350->rtc.update_enabled) | ||
313 | return 0; | ||
314 | |||
310 | if (enabled) | 315 | if (enabled) |
311 | wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_SEC); | 316 | wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_SEC); |
312 | else | 317 | else |
313 | wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC); | 318 | wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC); |
314 | 319 | ||
320 | wm8350->rtc.update_enabled = enabled; | ||
321 | |||
315 | return 0; | 322 | return 0; |
316 | } | 323 | } |
317 | 324 | ||
diff --git a/include/linux/mfd/wm8350/rtc.h b/include/linux/mfd/wm8350/rtc.h index 24add2bef6c9..ebd72ffc62d1 100644 --- a/include/linux/mfd/wm8350/rtc.h +++ b/include/linux/mfd/wm8350/rtc.h | |||
@@ -263,6 +263,7 @@ struct wm8350_rtc { | |||
263 | struct platform_device *pdev; | 263 | struct platform_device *pdev; |
264 | struct rtc_device *rtc; | 264 | struct rtc_device *rtc; |
265 | int alarm_enabled; /* used over suspend/resume */ | 265 | int alarm_enabled; /* used over suspend/resume */ |
266 | int update_enabled; | ||
266 | }; | 267 | }; |
267 | 268 | ||
268 | #endif | 269 | #endif |