Patchwork rtc: imxdi: fix "irq 25: nobody cared" error

login
register
mail settings
Submitter Baruch Siach
Date Feb. 8, 2010, 8:50 a.m.
Message ID <0453da6732af4cac2d214b77e7288120ee44beae.1265618415.git.baruch@tkos.co.il>
Download mbox | patch
Permalink /patch/44766/
State New
Headers show

Comments

Baruch Siach - Feb. 8, 2010, 8:50 a.m.
Make sure to call di_write_wait() only after request_irq(), since
di_write_wait() enables interrupts.

Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 drivers/rtc/rtc-imxdi.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)

Patch

diff --git a/drivers/rtc/rtc-imxdi.c b/drivers/rtc/rtc-imxdi.c
index 1f4820e..7f207cd 100644
--- a/drivers/rtc/rtc-imxdi.c
+++ b/drivers/rtc/rtc-imxdi.c
@@ -410,13 +410,6 @@  static int dryice_rtc_probe(struct platform_device *pdev)
 	 * Initialize dryice hardware
 	 */
 
-	/* put dryice into valid state */
-	if (__raw_readl(imxdi->ioaddr + DSR) & DSR_NVF) {
-		rc = di_write_wait(imxdi, DSR_NVF | DSR_SVF, DSR);
-		if (rc)
-			goto err;
-	}
-
 	/* mask all interrupts */
 	__raw_writel(0, imxdi->ioaddr + DIER);
 
@@ -427,6 +420,13 @@  static int dryice_rtc_probe(struct platform_device *pdev)
 		goto err;
 	}
 
+	/* put dryice into valid state */
+	if (__raw_readl(imxdi->ioaddr + DSR) & DSR_NVF) {
+		rc = di_write_wait(imxdi, DSR_NVF | DSR_SVF, DSR);
+		if (rc)
+			goto err;
+	}
+
 	/* initialize alarm */
 	rc = di_write_wait(imxdi, DCAMR_UNSET, DCAMR);
 	if (rc)