diff options
author | Arjan van de Ven <arjan@infradead.org> | 2006-02-19 08:21:55 +0300 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-02-19 08:21:55 +0300 |
commit | c4e32e9faaaa83340dbbc00e07c48d38f032b7dc (patch) | |
tree | aa3adb5073a8c4c70a7f4b7f2dda57e9d1c52d85 /include/linux | |
parent | e676c232e670e27d8b3783e1167f34288e17c83f (diff) | |
download | linux-c4e32e9faaaa83340dbbc00e07c48d38f032b7dc.tar.xz |
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 'include/linux')
-rw-r--r-- | include/linux/libps2.h | 2 | ||||
-rw-r--r-- | include/linux/serio.h | 9 |
2 files changed, 6 insertions, 5 deletions
diff --git a/include/linux/libps2.h b/include/linux/libps2.h index a710bddda4eb..08a450a9dbf7 100644 --- a/include/linux/libps2.h +++ b/include/linux/libps2.h @@ -28,7 +28,7 @@ struct ps2dev { struct serio *serio; /* Ensures that only one command is executing at a time */ - struct semaphore cmd_sem; + struct mutex cmd_mutex; /* Used to signal completion from interrupt handler */ wait_queue_head_t wait; diff --git a/include/linux/serio.h b/include/linux/serio.h index aa4d6493a034..582db2392d94 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -18,6 +18,7 @@ #include <linux/interrupt.h> #include <linux/list.h> #include <linux/spinlock.h> +#include <linux/mutex.h> #include <linux/device.h> #include <linux/mod_devicetable.h> @@ -42,7 +43,7 @@ struct serio { struct serio *parent, *child; struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ - struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ + struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ struct device dev; unsigned int registered; /* port has been fully registered with driver core */ @@ -151,17 +152,17 @@ static inline void serio_continue_rx(struct serio *serio) */ static inline int serio_pin_driver(struct serio *serio) { - return down_interruptible(&serio->drv_sem); + return mutex_lock_interruptible(&serio->drv_mutex); } static inline void serio_pin_driver_uninterruptible(struct serio *serio) { - down(&serio->drv_sem); + mutex_lock(&serio->drv_mutex); } static inline void serio_unpin_driver(struct serio *serio) { - up(&serio->drv_sem); + mutex_unlock(&serio->drv_mutex); } |