From c097c0a8903186e3c5ec7abc8fceb79a0a9e64a2 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Tue, 5 Jan 2010 13:59:08 +0000 Subject: [PATCH] --- yaml --- r: 186876 b: refs/heads/master c: 29c71b138c83c8191f1f7e46fcc28b9d6bc8a5dd h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/rtc/rtc-wm8350.c | 7 +++++++ trunk/include/linux/mfd/wm8350/rtc.h | 1 + 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index 06c66d861377..96e3a2667837 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: f99344fc69c3df46786a39ea4283a4175ea40b3f +refs/heads/master: 29c71b138c83c8191f1f7e46fcc28b9d6bc8a5dd diff --git a/trunk/drivers/rtc/rtc-wm8350.c b/trunk/drivers/rtc/rtc-wm8350.c index a5512f515998..3d0dc76b38af 100644 --- a/trunk/drivers/rtc/rtc-wm8350.c +++ b/trunk/drivers/rtc/rtc-wm8350.c @@ -307,11 +307,18 @@ static int wm8350_rtc_update_irq_enable(struct device *dev, { struct wm8350 *wm8350 = dev_get_drvdata(dev); + /* Suppress duplicate changes since genirq nests enable and + * disable calls. */ + if (enabled == wm8350->rtc.update_enabled) + return 0; + if (enabled) wm8350_unmask_irq(wm8350, WM8350_IRQ_RTC_SEC); else wm8350_mask_irq(wm8350, WM8350_IRQ_RTC_SEC); + wm8350->rtc.update_enabled = enabled; + return 0; } diff --git a/trunk/include/linux/mfd/wm8350/rtc.h b/trunk/include/linux/mfd/wm8350/rtc.h index 24add2bef6c9..ebd72ffc62d1 100644 --- a/trunk/include/linux/mfd/wm8350/rtc.h +++ b/trunk/include/linux/mfd/wm8350/rtc.h @@ -263,6 +263,7 @@ struct wm8350_rtc { struct platform_device *pdev; struct rtc_device *rtc; int alarm_enabled; /* used over suspend/resume */ + int update_enabled; }; #endif