mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
rtc: rtc-pl031: Set wakeup flag prior to registering rtcdev
In some recent testing, I noticed the CLOCK_REALTIME_ALARM clockid wasn't functioning on my vexpress qemu environment. Looking into it I noticed the pl031 rtc driver doesn't set the wakeup flag on the device until after registering the device with the RTC subsystem. This causes the alarmtimer subsystem to not see the pl031 driver as a valid backing device, and that resuls in alarm clockids getting ENOTSUPP errors. Thus be sure to set the wakeup flag on the device prior to registering the rtcdev so the pl031 rtc driver can be used as the backing alarmtimer device. Cc: Linus Walleij <[email protected]> Cc: Alessandro Zummo <[email protected]> Cc: "Jon Medhurst (Tixy)" <[email protected]> Cc: [email protected] Acked-by: Linus Walleij <[email protected]> Signed-off-by: John Stultz <[email protected]>
This commit is contained in:
parent
233bcb411c
commit
07783397c6
1 changed files with 1 additions and 2 deletions
|
|
@ -371,6 +371,7 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
|
|||
}
|
||||
}
|
||||
|
||||
device_init_wakeup(&adev->dev, 1);
|
||||
ldata->rtc = rtc_device_register("pl031", &adev->dev, ops,
|
||||
THIS_MODULE);
|
||||
if (IS_ERR(ldata->rtc)) {
|
||||
|
|
@ -384,8 +385,6 @@ static int pl031_probe(struct amba_device *adev, const struct amba_id *id)
|
|||
goto out_no_irq;
|
||||
}
|
||||
|
||||
device_init_wakeup(&adev->dev, 1);
|
||||
|
||||
return 0;
|
||||
|
||||
out_no_irq:
|
||||
|
|
|
|||
Loading…
Reference in a new issue