aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/rtc/rtc-wm8350.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-03-07 18:56:04 -0500
committerLinus Torvalds <torvalds@linux-foundation.org>2010-03-07 18:56:04 -0500
commit6dc3eb5c1f96641cda7056aa34393e317076d6cf (patch)
tree9a615b884d7ff5375382b5a3f020f518f618c589 /drivers/rtc/rtc-wm8350.c
parent8fe900b8c7aa6a307e552ff776e0c04c28dcf9c8 (diff)
parent2c08583c6a6b4c5f5dea4cb0931eca82af7db6fe (diff)
Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6
* 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/sameo/mfd-2.6: (66 commits) mfd: Fix ucb1x00 build failure for collie_defconfig mfd: Fix lpc_sch related depends/selects, fix build error gpio: Fix sch_gpio warning gpio: add Intel SCH GPIO controller driver i2c: convert i2c-isch to platform_device mfd: Use completion interrupt for WM831x AUXADC mfd: Use completion interrupt for WM835x AUXADC mfd: Introduce remove_script function for twl4030 mfd/mmc: SDHI Kconfig update mfd: sh_mobile_sdhi MMC_CAP_MMC_HIGHSPEED support gpiolib: Force wm831x GPIOs into GPIO mode when requested mfd: Add WM831x revision B support gpiolib: Correct debugfs display of WM831x GPIO inversion gpiolib: Actually set output state in wm831x_gpio_direction_output() tmio_mmc: Balance cell enable()/disable() calls tmio_mmc: Remove const from platform data V3 tmio_mmc: Use 100ms mmc_detect_change() delay tmio_mmc: Add MMC_CAP_MMC_HIGHSPEED support V2 tmio_mmc: Keep card-detect interrupts enabled mfd: Add twl6030 base addr for ID0, ID1, ID2 ...
Diffstat (limited to 'drivers/rtc/rtc-wm8350.c')
-rw-r--r--drivers/rtc/rtc-wm8350.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/rtc/rtc-wm8350.c b/drivers/rtc/rtc-wm8350.c
index f1e440521c54..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
@@ -478,8 +485,8 @@ static int __devexit wm8350_rtc_remove(struct platform_device *pdev)
478 struct wm8350 *wm8350 = platform_get_drvdata(pdev); 485 struct wm8350 *wm8350 = platform_get_drvdata(pdev);
479 struct wm8350_rtc *wm_rtc = &wm8350->rtc; 486 struct wm8350_rtc *wm_rtc = &wm8350->rtc;
480 487
481 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC); 488 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_SEC, wm8350);
482 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM); 489 wm8350_free_irq(wm8350, WM8350_IRQ_RTC_ALM, wm8350);
483 490
484 rtc_device_unregister(wm_rtc->rtc); 491 rtc_device_unregister(wm_rtc->rtc);
485 492