public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Venu Byravarasu <vbyravarasu@nvidia.com>
To: <akpm@linux-foundation.org>, <swarren@wwwdotorg.org>,
	<a.zummo@towertech.it>
Cc: <linux-kernel@vger.kernel.org>, <rtc-linux@googlegroups.com>,
	Venu Byravarasu <vbyravarasu@nvidia.com>
Subject: [PATCH v2] rtc: tps65910: Use platform_get_irq to get RTC irq details
Date: Tue, 25 Sep 2012 10:59:24 +0530	[thread overview]
Message-ID: <1348550964-32534-1-git-send-email-vbyravarasu@nvidia.com> (raw)

As RTC driver needs only irq number from platform data,
using platform_get_irq(), instead of generic dev_get_platdata().

Signed-off-by: Venu Byravarasu <vbyravarasu@nvidia.com>
---
delta from v1:

Removed unrelated clean up done in the RTC driver, with patch #1.

 drivers/rtc/rtc-tps65910.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)

diff --git a/drivers/rtc/rtc-tps65910.c b/drivers/rtc/rtc-tps65910.c
index 691ab96..2290508 100644
--- a/drivers/rtc/rtc-tps65910.c
+++ b/drivers/rtc/rtc-tps65910.c
@@ -226,7 +226,6 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
 {
 	struct tps65910 *tps65910 = NULL;
 	struct tps65910_rtc *tps_rtc = NULL;
-	struct tps65910_board *pmic_plat_data;
 	int ret;
 	int irq;
 	u32 rtc_reg;
@@ -253,15 +252,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
-	pmic_plat_data = dev_get_platdata(tps65910->dev);
-	irq = pmic_plat_data->irq_base;
+	irq  = platform_get_irq(pdev, 0);
 	if (irq <= 0) {
 		dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n",
 			irq);
 		return ret;
 	}
 
-	irq += TPS65910_IRQ_RTC_ALARM;
 	ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
 		tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
 		"rtc-tps65910", &pdev->dev);
-- 
1.7.1.1


             reply	other threads:[~2012-09-25  5:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-25  5:29 Venu Byravarasu [this message]
2012-09-25  6:21 ` [PATCH v2] rtc: tps65910: Use platform_get_irq to get RTC irq details Stephen Warren
2012-09-25  6:58   ` Venu Byravarasu

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=1348550964-32534-1-git-send-email-vbyravarasu@nvidia.com \
    --to=vbyravarasu@nvidia.com \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=swarren@wwwdotorg.org \
    /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