summaryrefslogtreecommitdiff
path: root/drivers/input/serio/libps2.c
diff options
context:
space:
mode:
authorArjan van de Ven <arjan@infradead.org>2006-02-19 00:21:55 -0500
committerDmitry Torokhov <dtor_core@ameritech.net>2006-02-19 00:21:55 -0500
commitc4e32e9faaaa83340dbbc00e07c48d38f032b7dc (patch)
treeaa3adb5073a8c4c70a7f4b7f2dda57e9d1c52d85 /drivers/input/serio/libps2.c
parente676c232e670e27d8b3783e1167f34288e17c83f (diff)
Input: serio - semaphore to mutex conversion
The conversion was generated via scripts, and the result was validated automatically via a script as well. Signed-off-by: Arjan van de Ven <arjan@infradead.org> 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/serio/libps2.c')
-rw-r--r--drivers/input/serio/libps2.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/input/serio/libps2.c b/drivers/input/serio/libps2.c
index d4c990f7c85e..79c97f94bcbd 100644
--- a/drivers/input/serio/libps2.c
+++ b/drivers/input/serio/libps2.c
@@ -84,7 +84,7 @@ void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout)
maxbytes = sizeof(ps2dev->cmdbuf);
}
- down(&ps2dev->cmd_sem);
+ mutex_lock(&ps2dev->cmd_mutex);
serio_pause_rx(ps2dev->serio);
ps2dev->flags = PS2_FLAG_CMD;
@@ -94,7 +94,7 @@ void ps2_drain(struct ps2dev *ps2dev, int maxbytes, int timeout)
wait_event_timeout(ps2dev->wait,
!(ps2dev->flags & PS2_FLAG_CMD),
msecs_to_jiffies(timeout));
- up(&ps2dev->cmd_sem);
+ mutex_unlock(&ps2dev->cmd_mutex);
}
/*
@@ -177,7 +177,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
return -1;
}
- down(&ps2dev->cmd_sem);
+ mutex_lock(&ps2dev->cmd_mutex);
serio_pause_rx(ps2dev->serio);
ps2dev->flags = command == PS2_CMD_GETID ? PS2_FLAG_WAITID : 0;
@@ -229,7 +229,7 @@ int ps2_command(struct ps2dev *ps2dev, unsigned char *param, int command)
ps2dev->flags = 0;
serio_continue_rx(ps2dev->serio);
- up(&ps2dev->cmd_sem);
+ mutex_unlock(&ps2dev->cmd_mutex);
return rc;
}
@@ -281,7 +281,7 @@ int ps2_schedule_command(struct ps2dev *ps2dev, unsigned char *param, int comman
void ps2_init(struct ps2dev *ps2dev, struct serio *serio)
{
- init_MUTEX(&ps2dev->cmd_sem);
+ mutex_init(&ps2dev->cmd_mutex);
init_waitqueue_head(&ps2dev->wait);
ps2dev->serio = serio;
}