mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
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 <[email protected]> Cc: Kevin Hilman <[email protected]> Cc: Tony Lindgren <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
9d8c5b5284
commit
b99b94b523
1 changed files with 2 additions and 1 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in a new issue