OMAP: KEYPAD: sem2mutex conversion
PATCH 1/1 OMAP: KEYPAD: sem2mutex conversion
---Komal Shah
http://komalshah.blogspot.com/
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Subject: [PATCH] OMAP: KEYPAD: sem2mutex conversion
Signed-off-by Komal Shah <[email protected]>
---
drivers/input/keyboard/omap-keypad.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-)
a5bac55a8195a93ec930d8ee733672a75ef9a5e6
drivers/input/keyboard/omap-keypad.c +4 -3
@@ -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 lonstatic 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(struif ((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(strudisable_irq (INT_KEYBOARD ); kp_enable = state; } -up (&kp_enable_mutex); +mutex_unlock (&kp_enable_mutex);return strnlen (buf, count); }
Signature · 1 line
1.1.6