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 20/30] rtc: rtc-rc5t583: use devm_rtc_device_register()
Date: Thu, 14 Mar 2013 17:21:16 +0900	[thread overview]
Message-ID: <009701ce208c$e63471b0$b29d5510$%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-rc5t583.c |    4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diff --git a/drivers/rtc/rtc-rc5t583.c b/drivers/rtc/rtc-rc5t583.c
index eb3194d..518908d 100644
--- a/drivers/rtc/rtc-rc5t583.c
+++ b/drivers/rtc/rtc-rc5t583.c
@@ -256,7 +256,7 @@ static int rc5t583_rtc_probe(struct platform_device *pdev)
 	}
 	device_init_wakeup(&pdev->dev, 1);
 
-	ricoh_rtc->rtc = rtc_device_register(pdev->name, &pdev->dev,
+	ricoh_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
 		&rc5t583_rtc_ops, THIS_MODULE);
 	if (IS_ERR(ricoh_rtc->rtc)) {
 		ret = PTR_ERR(ricoh_rtc->rtc);
@@ -276,8 +276,6 @@ static int rc5t583_rtc_remove(struct platform_device *pdev)
 	struct rc5t583_rtc *rc5t583_rtc = dev_get_drvdata(&pdev->dev);
 
 	rc5t583_rtc_alarm_irq_enable(&rc5t583_rtc->rtc->dev, 0);
-
-	rtc_device_unregister(rc5t583_rtc->rtc);
 	return 0;
 }
 
-- 
1.7.2.5



  parent reply	other threads:[~2013-03-14  8:21 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 ` Jingoo Han [this message]
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 ` [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='009701ce208c$e63471b0$b29d5510$%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®