Skip to content

Commit

Permalink
drivers/rtc/rtc-palmas.c: init wakeup before device register
Browse files Browse the repository at this point in the history
Enable dev as wakeup device before calling rtc_device_register(), so that
it can create the "wakealarm" sysfs.

Signed-off-by: Wei Ni <wni@nvidia.com>
Acked-by: Laxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Wei Ni authored and Linus Torvalds committed Jul 3, 2013
1 parent 92e7f04 commit 2c5a5b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/rtc/rtc-palmas.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ static int palmas_rtc_probe(struct platform_device *pdev)

palmas_rtc->irq = platform_get_irq(pdev, 0);

device_init_wakeup(&pdev->dev, 1);
palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name,
&palmas_rtc_ops, THIS_MODULE);
if (IS_ERR(palmas_rtc->rtc)) {
Expand All @@ -283,7 +284,6 @@ static int palmas_rtc_probe(struct platform_device *pdev)
return ret;
}

device_set_wakeup_capable(&pdev->dev, 1);
return 0;
}

Expand Down

0 comments on commit 2c5a5b3

Please sign in to comment.