summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorLaxman Dewangan <ldewangan@nvidia.com>2013-03-12 14:00:29 +0530
committerDan Willemsen <dwillemsen@nvidia.com>2013-09-14 13:03:06 -0700
commit8fd04524708fa7b6da170262ab9374e90f8d6257 (patch)
treec4f1e2cbb64d20d4eef4afd2668a6be24e5b2154 /drivers/rtc
parent773cacef426cee91bbbaa8521134128ae4686ca8 (diff)
rtc: palmas: get irq number through platform_get_irq()
The palmas mfd driver pass the RTC interrupt through the IRQ_RESOURCE and hence RTC driver can get the irq by calling platform_get_irq(). Change-Id: Ib6e4afd0511ab6cf80df43defe29ffe50480f27c Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com> Reviewed-on: http://git-master/r/208338 (cherry picked from commit 34e9e76622d4cb6288fcfffbb537382628855a86) Reviewed-on: http://git-master/r/209988 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit Tested-by: Sumit Sharma <sumsharma@nvidia.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-palmas.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c
index aed71f5a87e6..148868abd726 100644
--- a/drivers/rtc/rtc-palmas.c
+++ b/drivers/rtc/rtc-palmas.c
@@ -358,18 +358,8 @@ static int __devinit palmas_rtc_probe(struct platform_device *pdev)
return ret;
}
- if (!regmap_irq_chip_get_base(palmas->irq_data))
- return -EINVAL;
-
- palmas_rtc->irq = regmap_irq_chip_get_base(palmas->irq_data);
- if (palmas_rtc->irq <= 0) {
- dev_err(&pdev->dev, "Wake up is not possible as irq = %d\n",
- palmas_rtc->irq);
- return ret;
- }
-
- palmas_rtc->irq += PALMAS_RTC_ALARM_IRQ;
-
+ palmas_rtc->irq = platform_get_irq(pdev, 0);
+ dev_info(&pdev->dev, "RTC interrupt %d\n", palmas_rtc->irq);
ret = request_threaded_irq(palmas_rtc->irq, NULL,
palmas_rtc_interrupt, IRQF_TRIGGER_LOW,
"palmas-rtc", &pdev->dev);