From: Jingoo Han <jg1.han@samsung.com>
To: "'Andrew Morton'" <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org,
"'Alessandro Zummo'" <a.zummo@towertech.it>,
rtc-linux@googlegroups.com, "'Jingoo Han'" <jg1.han@samsung.com>
Subject: [PATCH 25/30] rtc: rtc-starfire: use devm_rtc_device_register()
Date: Thu, 14 Mar 2013 17:22:53 +0900 [thread overview]
Message-ID: <009c01ce208d$1ff3ec00$5fdbc400$%han@samsung.com> (raw)
In-Reply-To: <008401ce208b$5c9dc6f0$15d954d0$%han@samsung.com>
devm_rtc_device_register() is device managed and makes cleanup
paths simpler.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/rtc/rtc-starfire.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/rtc/rtc-starfire.c b/drivers/rtc/rtc-starfire.c
index db7d076..987b5ec 100644
--- a/drivers/rtc/rtc-starfire.c
+++ b/drivers/rtc/rtc-starfire.c
@@ -39,8 +39,10 @@ static const struct rtc_class_ops starfire_rtc_ops = {
static int __init starfire_rtc_probe(struct platform_device *pdev)
{
- struct rtc_device *rtc = rtc_device_register("starfire", &pdev->dev,
- &starfire_rtc_ops, THIS_MODULE);
+ struct rtc_device *rtc;
+
+ rtc = devm_rtc_device_register(&pdev->dev, "starfire",
+ &starfire_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc))
return PTR_ERR(rtc);
@@ -51,10 +53,6 @@ static int __init starfire_rtc_probe(struct platform_device *pdev)
static int __exit starfire_rtc_remove(struct platform_device *pdev)
{
- struct rtc_device *rtc = platform_get_drvdata(pdev);
-
- rtc_device_unregister(rtc);
-
return 0;
}
--
1.7.2.5
next prev parent reply other threads:[~2013-03-14 8:22 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 8:10 [PATCH 01/30] rtc: rtc-ab3100: use devm_rtc_device_register() Jingoo Han
2013-03-14 8:10 ` [PATCH 02/30] rtc: rtc-au1xxx: " Jingoo Han
2013-03-14 8:11 ` [PATCH 03/30] rtc: rtc-bq32k: " Jingoo Han
2013-03-14 8:12 ` [PATCH 04/30] rtc: rtc-dm355evm: " Jingoo Han
2013-03-14 8:12 ` [PATCH 05/30] rtc: rtc-ds1302: " Jingoo Han
2013-03-14 8:13 ` [PATCH 06/30] rtc: rtc-ds1672: " Jingoo Han
2013-03-14 8:13 ` [PATCH 07/30] rtc: rtc-ds3234: " Jingoo Han
2013-03-14 8:13 ` [PATCH 08/30] rtc: rtc-efi: " Jingoo Han
2013-03-14 8:14 ` [PATCH 09/30] rtc: rtc-em3027: " Jingoo Han
2013-03-14 8:14 ` [PATCH 10/30] rtc: rtc-generic: " Jingoo Han
2013-03-14 8:15 ` [PATCH 11/30] rtc: hid-sensor-time: " Jingoo Han
2013-03-14 8:15 ` [PATCH 12/30] rtc: rtc-ls1x: " Jingoo Han
2013-03-14 8:15 ` [PATCH 13/30] rtc: rtc-m41t93: " Jingoo Han
2013-03-14 8:16 ` [PATCH 14/30] rtc: rtc-m41t94: " Jingoo Han
2013-03-14 8:19 ` [PATCH 15/30] rtc: rtc-m48t86: " Jingoo Han
2013-03-14 8:19 ` [PATCH 16/30] rtc: rtc-max6900: " Jingoo Han
2013-03-14 8:20 ` [PATCH 17/30] rtc: rtc-max6902: " Jingoo Han
2013-03-14 8:20 ` [PATCH 18/30] rtc: rtc-ps3: " Jingoo Han
2013-03-14 8:20 ` [PATCH 19/30] rtc: rtc-r9701: " Jingoo Han
2013-03-14 8:21 ` [PATCH 20/30] rtc: rtc-rc5t583: " Jingoo Han
2013-03-14 8:21 ` [PATCH 21/30] rtc: rtc-rs5c313: " Jingoo Han
2013-03-14 8:21 ` [PATCH 22/30] rtc: rtc-rv3029c2: " Jingoo Han
2013-03-14 8:22 ` [PATCH 23/30] rtc: rtc-rx4581: " Jingoo Han
2013-03-14 8:22 ` [PATCH 24/30] rtc: rtc-rx8581: " Jingoo Han
2013-03-14 8:22 ` Jingoo Han [this message]
2013-03-14 8:23 ` [PATCH 26/30] rtc: rtc-sun4v: " Jingoo Han
2013-03-14 8:23 ` [PATCH 27/30] rtc: rtc-test: " Jingoo Han
2013-03-14 8:23 ` [PATCH 28/30] rtc: rtc-tile: " Jingoo Han
2013-03-14 8:24 ` [PATCH 29/30] rtc: rtc-wm8350: " Jingoo Han
2013-03-14 8:24 ` [PATCH 30/30] rtc: rtc-x1205: " Jingoo Han
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='009c01ce208d$1ff3ec00$5fdbc400$%han@samsung.com' \
--to=jg1.han@samsung.com \
--cc=a.zummo@towertech.it \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--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