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: Kumar Gala <galak@codeaurora.org>
This commit is contained in:
Kumar Gala 2014-01-02 14:15:29 -06:00 committed by Artem Borisov
parent 062f9b42cd
commit 590dbc9a2e

View file

@ -98,6 +98,8 @@ static int alarmtimer_rtc_add_device(struct device *dev,
static inline void alarmtimer_rtc_timer_init(void)
{
mutex_init(&power_on_alarm_lock);
rtc_timer_init(&rtctimer, NULL, NULL);
}