Skip to content

Commit

Permalink
drivers/rtc/rtc-tps65910.c: use platform_get_irq() to get RTC irq det…
Browse files Browse the repository at this point in the history
…ails

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>
Acked-by: Stephen Warren <swarren@wwwdotorg.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Venu Byravarasu authored and Linus Torvalds committed Oct 5, 2012
1 parent 651fb48 commit 06f77d1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions drivers/rtc/rtc-tps65910.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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);
Expand Down

0 comments on commit 06f77d1

Please sign in to comment.