* [PATCH] drivers/rtc/rtc-twl.c: fix: rtcX/wakealarm attribute isn't created
@ 2013-07-23 11:48 Grygorii Strashko
0 siblings, 0 replies; only message in thread
From: Grygorii Strashko @ 2013-07-23 11:48 UTC (permalink / raw)
To: Alessandro Zummo, Andrew Morton
Cc: rtc-linux, linux-kernel, Grygorii Strashko, Kevin Hilman, Tony Lindgren
The device_init_wakeup() should be called before rtc_device_register().
Otherwise, sysfs "sys/class/rtc/rtcX/wakealarm" attribute will not be
seen from User space.
CC: Kevin Hilman <khilman@linaro.org>
CC: Tony Lindgren <tony@atomide.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
---
drivers/rtc/rtc-twl.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 02faf3c..c2e80d7 100644
--- a/drivers/rtc/rtc-twl.c
+++ b/drivers/rtc/rtc-twl.c
@@ -524,6 +524,8 @@ static int twl_rtc_probe(struct platform_device *pdev)
if (ret < 0)
goto out1;
+ device_init_wakeup(&pdev->dev, 1);
+
rtc = rtc_device_register(pdev->name,
&pdev->dev, &twl_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) {
@@ -542,7 +544,6 @@ static int twl_rtc_probe(struct platform_device *pdev)
}
platform_set_drvdata(pdev, rtc);
- device_init_wakeup(&pdev->dev, 1);
return 0;
out2:
--
1.7.9.5
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2013-07-23 11:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-07-23 11:48 [PATCH] drivers/rtc/rtc-twl.c: fix: rtcX/wakealarm attribute isn't created Grygorii Strashko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®