git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git]
/
include
/
linux
/
serio.h
diff --git
a/include/linux/serio.h
b/include/linux/serio.h
index
41bdd5d
..
aa4d649
100644
(file)
--- a/
include/linux/serio.h
+++ b/
include/linux/serio.h
@@
-18,7
+18,6
@@
#include <linux/interrupt.h>
#include <linux/list.h>
#include <linux/spinlock.h>
#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>
#include <linux/device.h>
#include <linux/mod_devicetable.h>
@@
-41,10
+40,9
@@
struct serio {
void (*stop)(struct serio *);
struct serio *parent, *child;
void (*stop)(struct serio *);
struct serio *parent, *child;
- unsigned int depth; /* level of nesting in serio hierarchy */
struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */
struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */
- struct
mutex drv_mutex;
/* protects serio->drv so attributes can pin driver */
+ struct
semaphore drv_sem;
/* protects serio->drv so attributes can pin driver */
struct device dev;
unsigned int registered; /* port has been fully registered with driver core */
struct device dev;
unsigned int registered; /* port has been fully registered with driver core */
@@
-121,7
+119,7
@@
static inline void serio_cleanup(struct serio *serio)
}
/*
}
/*
- * Use the following fu
nc
tions to manipulate serio's per-port
+ * Use the following fu
cn
tions to manipulate serio's per-port
* driver-specific data.
*/
static inline void *serio_get_drvdata(struct serio *serio)
* driver-specific data.
*/
static inline void *serio_get_drvdata(struct serio *serio)
@@
-135,7
+133,7
@@
static inline void serio_set_drvdata(struct serio *serio, void *data)
}
/*
}
/*
- * Use the following fu
nc
tions to protect critical sections in
+ * Use the following fu
cn
tions to protect critical sections in
* driver code from port's interrupt handler
*/
static inline void serio_pause_rx(struct serio *serio)
* driver code from port's interrupt handler
*/
static inline void serio_pause_rx(struct serio *serio)
@@
-149,21
+147,21
@@
static inline void serio_continue_rx(struct serio *serio)
}
/*
}
/*
- * Use the following fu
nc
tions to pin serio's driver in process context
+ * Use the following fu
cn
tions to pin serio's driver in process context
*/
static inline int serio_pin_driver(struct serio *serio)
{
*/
static inline int serio_pin_driver(struct serio *serio)
{
- return
mutex_lock_interruptible(&serio->drv_mutex
);
+ return
down_interruptible(&serio->drv_sem
);
}
static inline void serio_pin_driver_uninterruptible(struct serio *serio)
{
}
static inline void serio_pin_driver_uninterruptible(struct serio *serio)
{
-
mutex_lock(&serio->drv_mutex
);
+
down(&serio->drv_sem
);
}
static inline void serio_unpin_driver(struct serio *serio)
{
}
static inline void serio_unpin_driver(struct serio *serio)
{
-
mutex_unlock(&serio->drv_mutex
);
+
up(&serio->drv_sem
);
}
}