diff options
| author | Axel Lin <axel.lin@gmail.com> | 2010-09-22 16:04:59 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-09-22 20:22:39 -0400 |
| commit | eba93fcc34d6c4387ce8fbb53bb7b685f91f3343 (patch) | |
| tree | 20c38a19d44c8b8efe19555534481a9526ea2fb7 | |
| parent | f5665518c20c01e9045314872878f5788cb3fff2 (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 <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>
| -rw-r--r-- | drivers/rtc/rtc-ab3100.c | 2 |
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) | |||
| 235 | err = PTR_ERR(rtc); | 235 | err = PTR_ERR(rtc); |
| 236 | return err; | 236 | return err; |
| 237 | } | 237 | } |
| 238 | platform_set_drvdata(pdev, rtc); | ||
| 238 | 239 | ||
| 239 | return 0; | 240 | return 0; |
| 240 | } | 241 | } |
| @@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev) | |||
| 244 | struct rtc_device *rtc = platform_get_drvdata(pdev); | 245 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
| 245 | 246 | ||
| 246 | rtc_device_unregister(rtc); | 247 | rtc_device_unregister(rtc); |
| 248 | platform_set_drvdata(pdev, NULL); | ||
| 247 | return 0; | 249 | return 0; |
| 248 | } | 250 | } |
| 249 | 251 | ||
