[PATCH 4/4] alarmtimer: Always export alarmtimer_get_rtcdev() and update docs

From: Stephen Boyd
Date: Thu Jan 09 2020 - 10:59:21 EST


The export isn't there for the stubbed version of
alarmtimer_get_rtcdev(), so move the export outside of the ifdef. And
rtcdev isn't used outside of this ifdef so we don't need to redefine it
as NULL.

Signed-off-by: Stephen Boyd <swboyd@xxxxxxxxxxxx>
---
kernel/time/alarmtimer.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/kernel/time/alarmtimer.c b/kernel/time/alarmtimer.c
index be057638e89d..dc4d3edc2a7d 100644
--- a/kernel/time/alarmtimer.c
+++ b/kernel/time/alarmtimer.c
@@ -64,8 +64,6 @@ static DEFINE_SPINLOCK(rtcdev_lock);
* alarmtimer_get_rtcdev - Return selected rtcdevice
*
* This function returns the rtc device to use for wakealarms.
- * If one has not already been chosen, it checks to see if a
- * functional rtc device is available.
*/
struct rtc_device *alarmtimer_get_rtcdev(void)
{
@@ -78,7 +76,6 @@ struct rtc_device *alarmtimer_get_rtcdev(void)

return ret;
}
-EXPORT_SYMBOL_GPL(alarmtimer_get_rtcdev);

static int alarmtimer_rtc_add_device(struct device *dev,
struct class_interface *class_intf)
@@ -143,11 +140,11 @@ struct rtc_device *alarmtimer_get_rtcdev(void)
{
return NULL;
}
-#define rtcdev (NULL)
static inline int alarmtimer_rtc_interface_setup(void) { return 0; }
static inline void alarmtimer_rtc_interface_remove(void) { }
static inline void alarmtimer_rtc_timer_init(void) { }
#endif
+EXPORT_SYMBOL_GPL(alarmtimer_get_rtcdev);

/**
* alarmtimer_enqueue - Adds an alarm timer to an alarm_base timerqueue
--
Sent by a computer, using git, on the internet