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
/
gameport.h
diff --git
a/include/linux/gameport.h
b/include/linux/gameport.h
index
cd623ec
..
71e7b28
100644
(file)
--- a/
include/linux/gameport.h
+++ b/
include/linux/gameport.h
@@
-11,7
+11,9
@@
#include <asm/io.h>
#include <linux/list.h>
#include <asm/io.h>
#include <linux/list.h>
+#include <linux/mutex.h>
#include <linux/device.h>
#include <linux/device.h>
+#include <linux/timer.h>
struct gameport {
struct gameport {
@@
-39,7
+41,7
@@
struct gameport {
struct gameport *parent, *child;
struct gameport_driver *drv;
struct gameport *parent, *child;
struct gameport_driver *drv;
- 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 */
@@
-118,7
+120,7
@@
static inline void gameport_set_name(struct gameport *gameport, const char *name
}
/*
}
/*
- * Use the following fu
cn
tions to manipulate gameport's per-port
+ * Use the following fu
nc
tions to manipulate gameport's per-port
* driver-specific data.
*/
static inline void *gameport_get_drvdata(struct gameport *gameport)
* driver-specific data.
*/
static inline void *gameport_get_drvdata(struct gameport *gameport)
@@
-132,16
+134,16
@@
static inline void gameport_set_drvdata(struct gameport *gameport, void *data)
}
/*
}
/*
- * Use the following fu
cn
tions to pin gameport's driver in process context
+ * Use the following fu
nc
tions to pin gameport's driver in process context
*/
static inline int gameport_pin_driver(struct gameport *gameport)
{
*/
static inline int gameport_pin_driver(struct gameport *gameport)
{
- return
down_interruptible(&gameport->drv_sem
);
+ return
mutex_lock_interruptible(&gameport->drv_mutex
);
}
static inline void gameport_unpin_driver(struct gameport *gameport)
{
}
static inline void gameport_unpin_driver(struct gameport *gameport)
{
-
up(&gameport->drv_sem
);
+
mutex_unlock(&gameport->drv_mutex
);
}
void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);
}
void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);