Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5d74bd91 authored by Kumar Gala's avatar Kumar Gala
Browse files

rtc: alarm: init power_on_alarm_lock mutex in alarmtimer_rtc_timer_init



Moved mutex_init of power_on_alarm_lock into alarmtimer_rtc_timer_init
so that if CONFIG_RTC_CLASS is not enabled, we dont try to initialize
the mutex.  This fixes a build issue when !CONFIG_RTC_CLASS

Change-Id: I270564b94fd54162aa177a2c9767655098662259
Signed-off-by: default avatarKumar Gala <galak@codeaurora.org>
parent d2056c0d
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -181,6 +181,8 @@ static void alarmtimer_rtc_remove_device(struct device *dev,

static inline void alarmtimer_rtc_timer_init(void)
{
	mutex_init(&power_on_alarm_lock);

	rtc_timer_init(&rtctimer, NULL, NULL);
}

@@ -897,7 +899,6 @@ static int __init alarmtimer_init(void)
		.nsleep		= alarm_timer_nsleep,
	};

	mutex_init(&power_on_alarm_lock);
	alarmtimer_rtc_timer_init();

	posix_timers_register_clock(CLOCK_REALTIME_ALARM, &alarm_clock);