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
Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git]
/
include
/
linux
/
serio.h
diff --git
a/include/linux/serio.h
b/include/linux/serio.h
index
a2d3b9a
..
6348e83
100644
(file)
--- 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/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>
@@
-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 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 */
struct device dev;
unsigned int registered; /* port has been fully registered with driver core */
@@
-83,6
+84,7
@@
static inline void serio_register_port(struct serio *serio)
}
void serio_unregister_port(struct serio *serio);
}
void serio_unregister_port(struct serio *serio);
+void serio_unregister_child_port(struct serio *serio);
void __serio_unregister_port_delayed(struct serio *serio, struct module *owner);
static inline void serio_unregister_port_delayed(struct serio *serio)
{
void __serio_unregister_port_delayed(struct serio *serio, struct module *owner);
static inline void serio_unregister_port_delayed(struct serio *serio)
{
@@
-118,7
+120,7
@@
static inline void serio_cleanup(struct serio *serio)
}
/*
}
/*
- * Use the following fu
cn
tions to manipulate serio's per-port
+ * Use the following fu
nc
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)
@@
-132,7
+134,7
@@
static inline void serio_set_drvdata(struct serio *serio, void *data)
}
/*
}
/*
- * Use the following fu
cn
tions to protect critical sections in
+ * Use the following fu
nc
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)
@@
-146,16
+148,21
@@
static inline void serio_continue_rx(struct serio *serio)
}
/*
}
/*
- * Use the following fu
cn
tions to pin serio's driver in process context
+ * Use the following fu
nc
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 down_interruptible(&serio->drv_sem);
+ return mutex_lock_interruptible(&serio->drv_mutex);
+}
+
+static inline void serio_pin_driver_uninterruptible(struct serio *serio)
+{
+ mutex_lock(&serio->drv_mutex);
}
static inline void serio_unpin_driver(struct serio *serio)
{
}
static inline void serio_unpin_driver(struct serio *serio)
{
-
up(&serio->drv_sem
);
+
mutex_unlock(&serio->drv_mutex
);
}
}