Commit 06f77d18 authored by Venu Byravarasu's avatar Venu Byravarasu Committed by Linus Torvalds

drivers/rtc/rtc-tps65910.c: use platform_get_irq() to get RTC irq details

As RTC driver needs only irq number from platform data, using
platform_get_irq(), instead of generic dev_get_platdata().
Signed-off-by: default avatarVenu Byravarasu <vbyravarasu@nvidia.com>
Acked-by: default avatarStephen Warren <swarren@wwwdotorg.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 651fb480
...@@ -226,7 +226,6 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev) ...@@ -226,7 +226,6 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
{ {
struct tps65910 *tps65910 = NULL; struct tps65910 *tps65910 = NULL;
struct tps65910_rtc *tps_rtc = NULL; struct tps65910_rtc *tps_rtc = NULL;
struct tps65910_board *pmic_plat_data;
int ret; int ret;
int irq; int irq;
u32 rtc_reg; u32 rtc_reg;
...@@ -253,15 +252,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev) ...@@ -253,15 +252,13 @@ static int __devinit tps65910_rtc_probe(struct platform_device *pdev)
if (ret < 0) if (ret < 0)
return ret; return ret;
pmic_plat_data = dev_get_platdata(tps65910->dev); irq = platform_get_irq(pdev, 0);
irq = pmic_plat_data->irq_base;
if (irq <= 0) { if (irq <= 0) {
dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n", dev_warn(&pdev->dev, "Wake up is not possible as irq = %d\n",
irq); irq);
return ret; return ret;
} }
irq += TPS65910_IRQ_RTC_ALARM;
ret = devm_request_threaded_irq(&pdev->dev, irq, NULL, ret = devm_request_threaded_irq(&pdev->dev, irq, NULL,
tps65910_rtc_interrupt, IRQF_TRIGGER_LOW, tps65910_rtc_interrupt, IRQF_TRIGGER_LOW,
"rtc-tps65910", &pdev->dev); "rtc-tps65910", &pdev->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment