]> git.baikalelectronics.ru Git - kernel.git/commit
alarmtimer: Fix unavailable wake-up source in sysfs
authorGeert Uytterhoeven <geert+renesas@glider.be>
Wed, 5 Jul 2017 12:08:35 +0000 (14:08 +0200)
committerJohn Stultz <john.stultz@linaro.org>
Thu, 17 Aug 2017 19:15:10 +0000 (12:15 -0700)
commit921f985b7225476c4c52c28ca063e802359fe60a
treefa89b4e29c1f1a821f48244bdde9972d0ced5276
parent0a5b55f4cb81332de57bc790d298cbb567bee51a
alarmtimer: Fix unavailable wake-up source in sysfs

Currently the alarmtimer registers a wake-up source unconditionally,
regardless of the system having a (wake-up capable) RTC or not.
Hence the alarmtimer will always show up in
/sys/kernel/debug/wakeup_sources, even if it is not available, and thus
cannot be a wake-up source.

To fix this, postpone registration until a wake-up capable RTC device is
added.

Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Miroslav Lichvar <mlichvar@redhat.com>
Cc: Richard Cochran <richardcochran@gmail.com>
Cc: Prarit Bhargava <prarit@redhat.com>
Cc: Stephen Boyd <stephen.boyd@linaro.org>
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: John Stultz <john.stultz@linaro.org>
kernel/time/alarmtimer.c