提交 2c5a5b30 编写于 作者: W Wei Ni 提交者: Linus Torvalds

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: NWei Ni <wni@nvidia.com>
Acked-by: NLaxman Dewangan <ldewangan@nvidia.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 92e7f04a
......@@ -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)) {
......@@ -283,7 +284,6 @@ static int palmas_rtc_probe(struct platform_device *pdev)
return ret;
}
device_set_wakeup_capable(&pdev->dev, 1);
return 0;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册