summaryrefslogtreecommitdiff
path: root/drivers/rtc
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2013-08-01 00:53:41 +0400
committerLinus Torvalds <torvalds@linux-foundation.org>2013-08-01 01:41:03 +0400
commitb99b94b52339dc186810e29f1f6472d86c42d2d9 (patch)
tree93403762eae4dc098c81fa1ea35fbba692577988 /drivers/rtc
parent9d8c5b5284e4a0167c5f7b1193692492358b8700 (diff)
downloadlinux-b99b94b52339dc186810e29f1f6472d86c42d2d9.tar.xz
drivers/rtc/rtc-twl.c: fix: rtcX/wakealarm attribute isn't created
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. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Cc: Kevin Hilman <khilman@linaro.org> Cc: Tony Lindgren <tony@atomide.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/rtc')
-rw-r--r--drivers/rtc/rtc-twl.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/rtc/rtc-twl.c b/drivers/rtc/rtc-twl.c
index 02faf3c4e0d5..c2e80d7ca5e2 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: