Patchwork [V2] rtc: tps6586x: device wakeup flags correction

login
register
mail settings
Submitter Dmitry Osipenko
Date May 22, 2013, 11:29 p.m.
Message ID <519D54BE.1030409@gmail.com>
Download mbox | patch
Permalink /patch/245781/
State New
Headers show

Comments

Dmitry Osipenko - May 22, 2013, 11:29 p.m.
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>
---
 V2: changed description

 drivers/rtc/rtc-tps6586x.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch

diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
index 459c2ff..426901c 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)
 		return ret;
 	}

+	device_init_wakeup(&pdev->dev, 1);
+
 	platform_set_drvdata(pdev, rtc);
 	rtc->rtc = devm_rtc_device_register(&pdev->dev, dev_name(&pdev->dev),
 				       &tps6586x_rtc_ops, THIS_MODULE);
@@ -292,7 +294,6 @@  static int tps6586x_rtc_probe(struct platform_device *pdev)
 		goto fail_rtc_register;
 	}
 	disable_irq(rtc->irq);
-	device_set_wakeup_capable(&pdev->dev, 1);
 	return 0;

 fail_rtc_register: