mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
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>
This commit is contained in:
parent
e676c232e6
commit
c4e32e9faa
5 changed files with 46 additions and 43 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue