#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>
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;
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);
disable_irq(INT_KEYBOARD);
kp_enable = state;
}
- up(&kp_enable_mutex);
+ mutex_unlock(&kp_enable_mutex);
return strnlen(buf, count);
}