Commit eba93fcc34d6c4387ce8fbb53bb7b685f91f3343
Committed by
Linus Torvalds
1 parent
f5665518c2
Exists in
master
and in
4 other branches
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>
Showing 1 changed file with 2 additions and 0 deletions Side-by-side Diff
drivers/rtc/rtc-ab3100.c
... | ... | @@ -235,6 +235,7 @@ |
235 | 235 | err = PTR_ERR(rtc); |
236 | 236 | return err; |
237 | 237 | } |
238 | + platform_set_drvdata(pdev, rtc); | |
238 | 239 | |
239 | 240 | return 0; |
240 | 241 | } |
... | ... | @@ -244,6 +245,7 @@ |
244 | 245 | struct rtc_device *rtc = platform_get_drvdata(pdev); |
245 | 246 | |
246 | 247 | rtc_device_unregister(rtc); |
248 | + platform_set_drvdata(pdev, NULL); | |
247 | 249 | return 0; |
248 | 250 | } |
249 | 251 |