aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/keyboard/atkbd.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-02-19 00:22:18 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-02-19 00:22:18 -0500
commit33d3f07ae17c0060dc01f26180c94cf0a39efdf1 (patch)
treec085ad804604f2a89f240e7556631245391b652a /drivers/input/keyboard/atkbd.c
parentc14471dc2e014f9508ea1ac48394e5437ee970d7 (diff)
Input: atkbd - semaphore to mutex conversion
The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Ingo Molnar <mingo@elte.hu> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
Diffstat (limited to 'drivers/input/keyboard/atkbd.c')
-rw-r--r--drivers/input/keyboard/atkbd.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
index ffacf6eca5f5..b45981870c7a 100644
--- a/drivers/input/keyboard/atkbd.c
+++ b/drivers/input/keyboard/atkbd.c
@@ -27,6 +27,7 @@
27#include <linux/serio.h> 27#include <linux/serio.h>
28#include <linux/workqueue.h> 28#include <linux/workqueue.h>
29#include <linux/libps2.h> 29#include <linux/libps2.h>
30#include <linux/mutex.h>
30 31
31#define DRIVER_DESC "AT and PS/2 keyboard driver" 32#define DRIVER_DESC "AT and PS/2 keyboard driver"
32 33
@@ -216,7 +217,7 @@ struct atkbd {
216 unsigned long time; 217 unsigned long time;
217 218
218 struct work_struct event_work; 219 struct work_struct event_work;
219 struct semaphore event_sem; 220 struct mutex event_mutex;
220 unsigned long event_mask; 221 unsigned long event_mask;
221}; 222};
222 223
@@ -449,7 +450,7 @@ static void atkbd_event_work(void *data)
449 unsigned char param[2]; 450 unsigned char param[2];
450 int i, j; 451 int i, j;
451 452
452 down(&atkbd->event_sem); 453 mutex_lock(&atkbd->event_mutex);
453 454
454 if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) { 455 if (test_and_clear_bit(ATKBD_LED_EVENT_BIT, &atkbd->event_mask)) {
455 param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0) 456 param[0] = (test_bit(LED_SCROLLL, dev->led) ? 1 : 0)
@@ -480,7 +481,7 @@ static void atkbd_event_work(void *data)
480 ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP); 481 ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP);
481 } 482 }
482 483
483 up(&atkbd->event_sem); 484 mutex_unlock(&atkbd->event_mutex);
484} 485}
485 486
486/* 487/*
@@ -846,7 +847,7 @@ static int atkbd_connect(struct serio *serio, struct serio_driver *drv)
846 atkbd->dev = dev; 847 atkbd->dev = dev;
847 ps2_init(&atkbd->ps2dev, serio); 848 ps2_init(&atkbd->ps2dev, serio);
848 INIT_WORK(&atkbd->event_work, atkbd_event_work, atkbd); 849 INIT_WORK(&atkbd->event_work, atkbd_event_work, atkbd);
849 init_MUTEX(&atkbd->event_sem); 850 mutex_init(&atkbd->event_mutex);
850 851
851 switch (serio->id.type) { 852 switch (serio->id.type) {
852 853