X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=include%2Flinux%2Fgameport.h;h=71e7b2847cb30e3842b8a3ce9eb61bbf6b53e8d6;hb=4e8f10b7ccf1c3c53a818a157962074a7340732e;hp=cd623eccdbea61c8e8b8eba1f931645b95c01115;hpb=2089a0d38bc9c2cdd084207ebf7082b18cf4bf58;p=linux-2.6 diff --git a/include/linux/gameport.h b/include/linux/gameport.h index cd623eccdb..71e7b2847c 100644 --- a/include/linux/gameport.h +++ b/include/linux/gameport.h @@ -11,7 +11,9 @@ #include #include +#include #include +#include struct gameport { @@ -39,7 +41,7 @@ struct gameport { 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 */ @@ -118,7 +120,7 @@ static inline void gameport_set_name(struct gameport *gameport, const char *name } /* - * Use the following fucntions to manipulate gameport's per-port + * Use the following functions to manipulate gameport's per-port * 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 fucntions to pin gameport's driver in process context + * Use the following functions to pin gameport's driver in process context */ 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) { - up(&gameport->drv_sem); + mutex_unlock(&gameport->drv_mutex); } void __gameport_register_driver(struct gameport_driver *drv, struct module *owner);