aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/gameport.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/gameport.h')
-rw-r--r--include/linux/gameport.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/include/linux/gameport.h b/include/linux/gameport.h
index 9c8e6da2393b..71e7b2847cb3 100644
--- a/include/linux/gameport.h
+++ b/include/linux/gameport.h
@@ -11,6 +11,7 @@
11 11
12#include <asm/io.h> 12#include <asm/io.h>
13#include <linux/list.h> 13#include <linux/list.h>
14#include <linux/mutex.h>
14#include <linux/device.h> 15#include <linux/device.h>
15#include <linux/timer.h> 16#include <linux/timer.h>
16 17
@@ -40,7 +41,7 @@ struct gameport {
40 struct gameport *parent, *child; 41 struct gameport *parent, *child;
41 42
42 struct gameport_driver *drv; 43 struct gameport_driver *drv;
43 struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ 44 struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */
44 45
45 struct device dev; 46 struct device dev;
46 unsigned int registered; /* port has been fully registered with driver core */ 47 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)
137 */ 138 */
138static inline int gameport_pin_driver(struct gameport *gameport) 139static inline int gameport_pin_driver(struct gameport *gameport)
139{ 140{
140 return down_interruptible(&gameport->drv_sem); 141 return mutex_lock_interruptible(&gameport->drv_mutex);
141} 142}
142 143
143static inline void gameport_unpin_driver(struct gameport *gameport) 144static inline void gameport_unpin_driver(struct gameport *gameport)
144{ 145{
145 up(&gameport->drv_sem); 146 mutex_unlock(&gameport->drv_mutex);
146} 147}
147 148
148void __gameport_register_driver(struct gameport_driver *drv, struct module *owner); 149void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);