From: Thomas Gleixner Date: Tue, 7 Sep 2010 14:31:58 +0000 (+0000) Subject: input: Misc/hp_sdc_rtc: semaphore cleanup X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=10d0ff83078d5ef99aaf94a2aaceb740f5ced923;p=linux-beck.git input: Misc/hp_sdc_rtc: semaphore cleanup Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead. Signed-off-by: Thomas Gleixner Cc: Peter Zijlstra Cc: Christoph Hellwig Acked-by: Dmitry Torokhov LKML-Reference: <20100907125054.888438853@linutronix.de> --- diff --git a/drivers/input/misc/hp_sdc_rtc.c b/drivers/input/misc/hp_sdc_rtc.c index c19066479057..7e2c12a5b839 100644 --- a/drivers/input/misc/hp_sdc_rtc.c +++ b/drivers/input/misc/hp_sdc_rtc.c @@ -104,7 +104,7 @@ static int hp_sdc_rtc_do_read_bbrtc (struct rtc_time *rtctm) t.endidx = 91; t.seq = tseq; t.act.semaphore = &tsem; - init_MUTEX_LOCKED(&tsem); + sema_init(&tsem, 0); if (hp_sdc_enqueue_transaction(&t)) return -1; @@ -698,7 +698,7 @@ static int __init hp_sdc_rtc_init(void) return -ENODEV; #endif - init_MUTEX(&i8042tregs); + sema_init(&i8042tregs, 1); if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) return ret;