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 23/30] rtc: rtc-rx4581: use devm_rtc_device_register()
Date: Thu, 14 Mar 2013 17:22:14 +0900	[thread overview]
Message-ID: <009a01ce208d$0853cbb0$18fb6310$%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-rx4581.c |    7 ++-----
 1 files changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/rtc/rtc-rx4581.c b/drivers/rtc/rtc-rx4581.c
index 599ec73..d1b88db 100644
--- a/drivers/rtc/rtc-rx4581.c
+++ b/drivers/rtc/rtc-rx4581.c
@@ -273,8 +273,8 @@ static int rx4581_probe(struct spi_device *spi)
 	if (res != 0)
 		return res;
 
-	rtc = rtc_device_register("rx4581",
-				&spi->dev, &rx4581_rtc_ops, THIS_MODULE);
+	rtc = devm_rtc_device_register(&spi->dev, "rx4581",
+				&rx4581_rtc_ops, THIS_MODULE);
 	if (IS_ERR(rtc))
 		return PTR_ERR(rtc);
 
@@ -284,9 +284,6 @@ static int rx4581_probe(struct spi_device *spi)
 
 static int rx4581_remove(struct spi_device *spi)
 {
-	struct rtc_device *rtc = dev_get_drvdata(&spi->dev);
-
-	rtc_device_unregister(rtc);
 	return 0;
 }
 
-- 
1.7.2.5



  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: " 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 ` Jingoo Han [this message]
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 ` [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='009a01ce208d$0853cbb0$18fb6310$%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®