diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2018-10-18 16:52:26 +0800 |
---|---|---|
committer | Alexandre Belloni <alexandre.belloni@bootlin.com> | 2018-10-25 02:35:36 +0200 |
commit | a86d6b23ed9729d47b2818857d8fa5d8e3f8284a (patch) | |
tree | 73ccec493a76589443ecc1c1f6893a92a577082e /drivers/rtc | |
parent | ef0f02fd69a02b50e468a4ddbe33e3d81671e248 (diff) | |
download | linux-a86d6b23ed9729d47b2818857d8fa5d8e3f8284a.tar.bz2 |
rtc: sc27xx: Set wakeup capability before registering rtc device
Set wakeup capability before registering rtc device, in case the alarmtimer
can find one available rtc device.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Diffstat (limited to 'drivers/rtc')
-rw-r--r-- | drivers/rtc/rtc-sc27xx.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-sc27xx.c b/drivers/rtc/rtc-sc27xx.c index deea5c3726ad..8afba125ad71 100644 --- a/drivers/rtc/rtc-sc27xx.c +++ b/drivers/rtc/rtc-sc27xx.c @@ -631,16 +631,18 @@ static int sprd_rtc_probe(struct platform_device *pdev) return ret; } + device_init_wakeup(&pdev->dev, 1); + rtc->rtc->ops = &sprd_rtc_ops; rtc->rtc->range_min = 0; rtc->rtc->range_max = 5662310399LL; ret = rtc_register_device(rtc->rtc); if (ret) { dev_err(&pdev->dev, "failed to register rtc device\n"); + device_init_wakeup(&pdev->dev, 0); return ret; } - device_init_wakeup(&pdev->dev, 1); return 0; } |