diff options
author | Dmitry Osipenko <digetx@gmail.com> | 2013-06-12 17:04:44 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-12 19:29:45 -0400 |
commit | 5a280844bb3bcd79076cac6ad002f71d25c798e5 (patch) | |
tree | bdc11986ca10947403105314a901aa8a1ef4457f | |
parent | f101a9464bfbda42730b54a66f926d75ed2cd31e (diff) |
drivers/rtc/rtc-tps6586x.c: device wakeup flags correction
Use device_init_wakeup() instead of device_set_wakeup_capable() and move
it before rtc dev registering. This fixes alarmtimer not registered
when tps6586x rtc is the only wakeup compatible rtc in the system.
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
Cc: Laxman Dewangan <ldewangan@nvidia.com>
Cc: Jingoo Han <jg1.han@samsung.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-tps6586x.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c index 459c2ffc95a6..426901cef14f 100644 --- a/drivers/rtc/rtc-tps6586x.c +++ b/drivers/rtc/rtc-tps6586x.c | |||
@@ -273,6 +273,8 @@ static int tps6586x_rtc_probe(struct platform_device *pdev) | |||
273 | return ret; | 273 | return ret; |
274 | } | 274 | } |
275 | 275 | ||
276 | device_init_wakeup(&pdev->dev, 1); | ||
277 | |||
276 | platform_set_drvdata(pdev, rtc); | 278 | platform_set_drvdata(pdev, rtc); |
277 | rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev), | 279 | rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev), |
278 | &tps6586x_rtc_ops, THIS_MODULE); | 280 | &tps6586x_rtc_ops, THIS_MODULE); |
@@ -292,7 +294,6 @@ static int tps6586x_rtc_probe(struct platform_device *pdev) | |||
292 | goto fail_rtc_register; | 294 | goto fail_rtc_register; |
293 | } | 295 | } |
294 | disable_irq(rtc->irq); | 296 | disable_irq(rtc->irq); |
295 | device_set_wakeup_capable(&pdev->dev, 1); | ||
296 | return 0; | 297 | return 0; |
297 | 298 | ||
298 | fail_rtc_register: | 299 | fail_rtc_register: |