mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
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 28/30] rtc: rtc-tile: use devm_rtc_device_register()
Date: Thu, 14 Mar 2013 17:23:52 +0900	[thread overview]
Message-ID: <009f01ce208d$4331d560$c9958020$%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-tile.c |    9 ++-------
 1 files changed, 2 insertions(+), 7 deletions(-)

diff --git a/drivers/rtc/rtc-tile.c b/drivers/rtc/rtc-tile.c
index 62db484..249b653 100644
--- a/drivers/rtc/rtc-tile.c
+++ b/drivers/rtc/rtc-tile.c
@@ -80,8 +80,8 @@ static int tile_rtc_probe(struct platform_device *dev)
 {
 	struct rtc_device *rtc;
 
-	rtc = rtc_device_register("tile",
-				  &dev->dev, &tile_rtc_ops, THIS_MODULE);
+	rtc = devm_rtc_device_register(&dev->dev, "tile",
+				&tile_rtc_ops, THIS_MODULE);
 
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
@@ -96,11 +96,6 @@ static int tile_rtc_probe(struct platform_device *dev)
  */
 static int tile_rtc_remove(struct platform_device *dev)
 {
-	struct rtc_device *rtc = platform_get_drvdata(dev);
-
-	if (rtc)
-		rtc_device_unregister(rtc);
-
 	platform_set_drvdata(dev, NULL);
 
 	return 0;
-- 
1.7.2.5



  parent reply	other threads:[~2013-03-14  8:23 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: " 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 ` [PATCH 25/30] rtc: rtc-starfire: " Jingoo Han
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 ` Jingoo Han [this message]
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='009f01ce208d$4331d560$c9958020$%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

all inboxes | Powered by JetHome®