From c6690eef19523928c66376afcddc874e3ebe6ae5 Mon Sep 17 00:00:00 2001 From: Komal Shah Date: Tue, 28 Mar 2006 06:48:13 -0800 Subject: [PATCH] [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 --- drivers/input/keyboard/omap-keypad.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) 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); } -- 2.41.1