From: Axel Lin <axel.lin@gmail.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
Mattias Wallin <mattias.wallin@stericsson.com>,
Linus Walleij <linus.walleij@stericsson.com>,
rtc-linux@googlegroups.com
Subject: [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe()
Date: Sun, 19 Sep 2010 18:22:06 +0800 [thread overview]
Message-ID: <1284891726.2199.3.camel@phoenix> (raw)
Otherwise, calling platform_get_drvdata() in ab3100_rtc_remove() return NULL.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
---
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;
}
--
1.7.0.4
next reply other threads:[~2010-09-19 10:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-19 10:22 Axel Lin [this message]
2010-09-20 2:00 ` [PATCH] RTC: rtc-ab3100 - Add missing platform_set_drvdata() in ab3100_rtc_probe() Wan ZongShun
2010-09-20 9:29 ` Linus Walleij
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1284891726.2199.3.camel@phoenix \
--to=axel.lin@gmail.com \
--cc=a.zummo@towertech.it \
--cc=linus.walleij@stericsson.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mattias.wallin@stericsson.com \
--cc=rtc-linux@googlegroups.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox