RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
PATCH 1/1 RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL.
Signed-off-by Axel Lin <[email protected]>
--- drivers/rtc/rtc-ab3100.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)
drivers/rtc/rtc-ab3100.c +2 -0
@@ -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 ; }
Signature · 1 line
1.7.0.4
Hi Axel ,
2010/9/19 Axel Lin <[email protected]>:
Quoted 3 lines
Otherwise, calling
platform_get_drvdata()inab3100_rtc_remove()return NULL.Signed-off-by Axel Lin <[email protected]>
Acked-by Wan ZongShun <[email protected]>
Quoted 35 lines
---
drivers/rtc/rtc-ab3100.c | 2 ++1 files changed, 2 insertions(+), 0 deletions(-)drivers/rtc/rtc-ab3100.c +2
-1@@ -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; } --1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Signature · 10 lines
*linux-arm-kernel mailing list mail addr:[email protected] you can subscribe by: http://lists.infradead.org/mailman/listinfo/linux-arm-kernel * linux-arm-NUC900 mailing list mail addr:[email protected] main web: https://groups.google.com/group/NUC900 you can subscribe it by sending me mail: [email protected]
Quoted 3 lines · Axel Lin
Otherwise, calling
platform_get_drvdata()inab3100_rtc_remove()return NULL.Signed-off-by Axel Lin <[email protected]>
Ah thanks!
Acked-by Linus Walleij <[email protected]>
Yours,
Linus Walleij