diff options
author | Wei Ni <wni@nvidia.com> | 2013-07-03 18:08:00 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-07-03 19:08:00 -0400 |
commit | 2c5a5b30917b725ea95fa189e52fc8412f6a2814 (patch) | |
tree | 16c379d7f783f5b0b919401d320123d62191aa0a | |
parent | 92e7f04a7fcc9e7f5955f3337e26ca4ac2ae387b (diff) |
drivers/rtc/rtc-palmas.c: init wakeup before device register
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>
-rw-r--r-- | drivers/rtc/rtc-palmas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-palmas.c b/drivers/rtc/rtc-palmas.c index 50204d474eb7..a1fecc8d97fc 100644 --- a/drivers/rtc/rtc-palmas.c +++ b/drivers/rtc/rtc-palmas.c | |||
@@ -265,6 +265,7 @@ static int palmas_rtc_probe(struct platform_device *pdev) | |||
265 | 265 | ||
266 | palmas_rtc->irq = platform_get_irq(pdev, 0); | 266 | palmas_rtc->irq = platform_get_irq(pdev, 0); |
267 | 267 | ||
268 | device_init_wakeup(&pdev->dev, 1); | ||
268 | palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, | 269 | palmas_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, |
269 | &palmas_rtc_ops, THIS_MODULE); | 270 | &palmas_rtc_ops, THIS_MODULE); |
270 | if (IS_ERR(palmas_rtc->rtc)) { | 271 | if (IS_ERR(palmas_rtc->rtc)) { |
@@ -283,7 +284,6 @@ static int palmas_rtc_probe(struct platform_device *pdev) | |||
283 | return ret; | 284 | return ret; |
284 | } | 285 | } |
285 | 286 | ||
286 | device_set_wakeup_capable(&pdev->dev, 1); | ||
287 | return 0; | 287 | return 0; |
288 | } | 288 | } |
289 | 289 | ||