aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAxel Lin <[email protected]>2010-09-22 13:04:59 -0700
committerLinus Torvalds <[email protected]>2010-09-22 17:22:39 -0700
commiteba93fcc34d6c4387ce8fbb53bb7b685f91f3343 (patch)
tree20c38a19d44c8b8efe19555534481a9526ea2fb7
parentf5665518c20c01e9045314872878f5788cb3fff2 (diff)
drivers/rtc/rtc-ab3100.c: add missing platform_set_drvdata() in ab3100_rtc_probe()
Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() returns NULL. Signed-off-by: Axel Lin <[email protected]> Acked-by:Wan ZongShun <[email protected]> Acked-by: Linus Walleij <[email protected]> Cc: Alessandro Zummo <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
-rw-r--r--drivers/rtc/rtc-ab3100.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/rtc/rtc-ab3100.c b/drivers/rtc/rtc-ab3100.c
index d26780ea254b..261a07e0fb24 100644
--- a/drivers/rtc/rtc-ab3100.c
+++ b/drivers/rtc/rtc-ab3100.c
@@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
err = PTR_ERR(rtc);
return err;
}
+ platform_set_drvdata(pdev, rtc);
return 0;
}
@@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev)
struct rtc_device *rtc = platform_get_drvdata(pdev);
rtc_device_unregister(rtc);
+ platform_set_drvdata(pdev, NULL);
return 0;
}