* [PATCH] rtc: max8925 crash since driver data not set before interr=
@ 2011-04-18 19:56 Philip Rakity
0 siblings, 0 replies; only message in thread
From: Philip Rakity @ 2011-04-18 19:56 UTC (permalink / raw)
To: linux-arm-kernel
upt
in probe set the platform data before setting up interrupts
avoids crash at start-up time.
Signed-off-by: Philip Rakity <prakity@marvell.com>
---
drivers/rtc/rtc-max8925.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/rtc/rtc-max8925.c b/drivers/rtc/rtc-max8925.c
index 174036d..24a326a 100644
--- a/drivers/rtc/rtc-max8925.c
+++ b/drivers/rtc/rtc-max8925.c
@@ -249,6 +249,9 @@ static int __devinit max8925_rtc_probe(struct platform_=
device *pdev)
info->dev =3D &pdev->dev;
irq =3D chip->irq_base + MAX8925_IRQ_RTC_ALARM0;
=20
+ dev_set_drvdata(&pdev->dev, info);
+ platform_set_drvdata(pdev, info);
+
ret =3D request_threaded_irq(irq, NULL, rtc_update_handler,
IRQF_ONESHOT, "rtc-alarm0", info);
if (ret < 0) {
@@ -265,9 +268,6 @@ static int __devinit max8925_rtc_probe(struct platform_=
device *pdev)
goto out_rtc;
}
=20
- dev_set_drvdata(&pdev->dev, info);
- platform_set_drvdata(pdev, info);
-
return 0;
out_rtc:
free_irq(chip->irq_base + MAX8925_IRQ_RTC_ALARM0, info);
--=20
1.7.0.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-18 19:56 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-18 19:56 [PATCH] rtc: max8925 crash since driver data not set before interr= Philip Rakity
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).