projects
/
powerpc.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Manual merge with Linus.
[powerpc.git]
/
include
/
linux
/
gameport.h
diff --git
a/include/linux/gameport.h
b/include/linux/gameport.h
index
9c8e6da
..
71e7b28
100644
(file)
--- a/
include/linux/gameport.h
+++ b/
include/linux/gameport.h
@@
-11,6
+11,7
@@
#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/timer.h>
#include <linux/device.h>
#include <linux/timer.h>
@@
-40,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 */
@@
-137,12
+138,12
@@
static inline void gameport_set_drvdata(struct gameport *gameport, void *data)
*/
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);