Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

input: Misc/hp_sdc_rtc: semaphore cleanup

Get rid of init_MUTEX[_LOCKED]() and use sema_init() instead.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Christoph Hellwig <hch@infradead.org>
Acked-by: Dmitry Torokhov <dtor@mail.ru>
LKML-Reference: <20100907125054.888438853@linutronix.de>

+2 -2
+2 -2
drivers/input/misc/hp_sdc_rtc.c
··· 104 104 t.endidx = 91; 105 105 t.seq = tseq; 106 106 t.act.semaphore = &tsem; 107 - init_MUTEX_LOCKED(&tsem); 107 + sema_init(&tsem, 0); 108 108 109 109 if (hp_sdc_enqueue_transaction(&t)) return -1; 110 110 ··· 698 698 return -ENODEV; 699 699 #endif 700 700 701 - init_MUTEX(&i8042tregs); 701 + sema_init(&i8042tregs, 1); 702 702 703 703 if ((ret = hp_sdc_request_timer_irq(&hp_sdc_rtc_isr))) 704 704 return ret;