]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[PATCH] ARM: OMAP: OMAP: KEYPAD: sem2mutex conversion
authorKomal Shah <komal_shah802003@yahoo.com>
Tue, 28 Mar 2006 14:48:13 +0000 (06:48 -0800)
committerTony Lindgren <tony@atomide.com>
Tue, 28 Mar 2006 14:48:13 +0000 (06:48 -0800)
Subject: [PATCH] OMAP: KEYPAD: sem2mutex conversion

sem2mutex conversion

Signed-off-by: Komal Shah <komal_shah802003@yahoo.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
drivers/input/keyboard/omap-keypad.c

index e6057faf5d749a221f4f920e2512688ce24e3b17..ff1acb5b48fda475e2c407eb6f8ea9e176749322 100644 (file)
@@ -32,6 +32,7 @@
 #include <linux/kernel.h>
 #include <linux/delay.h>
 #include <linux/platform_device.h>
+#include <linux/mutex.h>
 #include <asm/arch/irqs.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/hardware.h>
@@ -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);
 }