提交 eba93fcc 编写于 作者: A Axel Lin 提交者: Linus Torvalds

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: NAxel Lin <axel.lin@gmail.com>
Acked-by: NWan ZongShun <mcuos.com@gmail.com>
Acked-by: NLinus Walleij <linus.walleij@stericsson.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 f5665518
...@@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev) ...@@ -235,6 +235,7 @@ static int __init ab3100_rtc_probe(struct platform_device *pdev)
err = PTR_ERR(rtc); err = PTR_ERR(rtc);
return err; return err;
} }
platform_set_drvdata(pdev, rtc);
return 0; return 0;
} }
...@@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev) ...@@ -244,6 +245,7 @@ static int __exit ab3100_rtc_remove(struct platform_device *pdev)
struct rtc_device *rtc = platform_get_drvdata(pdev); struct rtc_device *rtc = platform_get_drvdata(pdev);
rtc_device_unregister(rtc); rtc_device_unregister(rtc);
platform_set_drvdata(pdev, NULL);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册