From: Komal Shah Date: Tue, 28 Mar 2006 14:48:13 +0000 (-0800) Subject: [PATCH] ARM: OMAP: OMAP: KEYPAD: sem2mutex conversion X-Git-Tag: v2.6.16-omap1~15 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c6690eef19523928c66376afcddc874e3ebe6ae5;p=linux-2.6-omap-h63xx.git [PATCH] ARM: OMAP: OMAP: KEYPAD: sem2mutex conversion Subject: [PATCH] OMAP: KEYPAD: sem2mutex conversion sem2mutex conversion Signed-off-by: Komal Shah Signed-off-by: Tony Lindgren --- diff --git a/drivers/input/keyboard/omap-keypad.c b/drivers/input/keyboard/omap-keypad.c index e6057faf5d7..ff1acb5b48f 100644 --- a/drivers/input/keyboard/omap-keypad.c +++ b/drivers/input/keyboard/omap-keypad.c @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -48,7 +49,7 @@ static void omap_kp_tasklet(unsigned long); static void omap_kp_timer(unsigned long); static unsigned char keypad_state[8]; -static DECLARE_MUTEX(kp_enable_mutex); +static DEFINE_MUTEX(kp_enable_mutex); static int kp_enable = 1; static int kp_cur_group = -1; @@ -250,7 +251,7 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attribute if ((state != 1) && (state != 0)) return -EINVAL; - down(&kp_enable_mutex); + mutex_lock(&kp_enable_mutex); if (state != kp_enable) { if (state) enable_irq(INT_KEYBOARD); @@ -258,7 +259,7 @@ static ssize_t omap_kp_enable_store(struct device *dev, struct device_attribute disable_irq(INT_KEYBOARD); kp_enable = state; } - up(&kp_enable_mutex); + mutex_unlock(&kp_enable_mutex); return strnlen(buf, count); }