From patchwork Sun Sep 19 10:22:06 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() Date: Sun, 19 Sep 2010 00:22:06 -0000 From: Axel Lin X-Patchwork-Id: 65154 Message-Id: <1284891726.2199.3.camel@phoenix> To: linux-kernel Cc: Alessandro Zummo , Mattias Wallin , Linus Walleij , rtc-linux@googlegroups.com Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL. Signed-off-by: Axel Lin Acked-by: Linus Walleij --- 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 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; }