]> git.baikalelectronics.ru Git - kernel.git/commit
alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n
authorStephen Boyd <swboyd@chromium.org>
Fri, 24 Jan 2020 05:58:48 +0000 (21:58 -0800)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 24 Jan 2020 20:03:53 +0000 (21:03 +0100)
commit4f5a8c7d60b6c4b4613642e56b2d0fb696d49a25
tree6798a3c8762aaf722cc47498bec0b6838b787397
parented5a6a4b5099eabf1f3bf8720cacb91b6fde8479
alarmtimer: Make alarmtimer_get_rtcdev() a stub when CONFIG_RTC_CLASS=n

The stubbed version of alarmtimer_get_rtcdev() is not exported.
so this won't work if this function is used in a module when
CONFIG_RTC_CLASS=n.

Move the stub function to the header file and make it inline so that
callers don't have to worry about linking against this symbol.

rtcdev isn't used outside of this ifdef so it's not required to be
redefined to NULL. Drop that while touching this area.

Signed-off-by: Stephen Boyd <swboyd@chromium.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/20200124055849.154411-4-swboyd@chromium.org
include/linux/alarmtimer.h
kernel/time/alarmtimer.c