aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2010-09-22 13:04:59 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-09-22 17:22:39 -0700
commiteba93fcc34d6c4387ce8fbb53bb7b685f91f3343 (patch)
tree20c38a19d44c8b8efe19555534481a9526ea2fb7 /drivers
parentf5665518c20c01e9045314872878f5788cb3fff2 (diff)
downloadkernel_samsung_tuna-eba93fcc34d6c4387ce8fbb53bb7b685f91f3343.zip
kernel_samsung_tuna-eba93fcc34d6c4387ce8fbb53bb7b685f91f3343.tar.gz
kernel_samsung_tuna-eba93fcc34d6c4387ce8fbb53bb7b685f91f3343.tar.bz2
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 <axel.lin@gmail.com> Acked-by:Wan ZongShun <mcuos.com@gmail.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Cc: Alessandro Zummo <a.zummo@towertech.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-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 d26780e..261a07e 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;
}