X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Flinux%2Fserio.h;h=aa4d6493a034b605d429bf237fd9a37c36fe9fff;hb=987b0145d94eecf292d8b301228356f44611ab7c;hp=6348e8330897c3393a88e937ef7ae167c767faca;hpb=e6a27dba1cf83d871b2dfcd64f04f12a67e3f4d5;p=linux-2.6.git diff --git a/include/linux/serio.h b/include/linux/serio.h index 6348e8330..aa4d6493a 100644 --- a/include/linux/serio.h +++ b/include/linux/serio.h @@ -18,7 +18,6 @@ #include #include #include -#include #include #include @@ -43,7 +42,7 @@ struct serio { struct serio *parent, *child; struct serio_driver *drv; /* accessed from interrupt, must be protected by serio->lock and serio->sem */ - struct mutex drv_mutex; /* protects serio->drv so attributes can pin driver */ + struct semaphore drv_sem; /* protects serio->drv so attributes can pin driver */ struct device dev; unsigned int registered; /* port has been fully registered with driver core */ @@ -120,7 +119,7 @@ static inline void serio_cleanup(struct serio *serio) } /* - * Use the following functions to manipulate serio's per-port + * Use the following fucntions to manipulate serio's per-port * driver-specific data. */ static inline void *serio_get_drvdata(struct serio *serio) @@ -134,7 +133,7 @@ static inline void serio_set_drvdata(struct serio *serio, void *data) } /* - * Use the following functions to protect critical sections in + * Use the following fucntions to protect critical sections in * driver code from port's interrupt handler */ static inline void serio_pause_rx(struct serio *serio) @@ -148,21 +147,21 @@ static inline void serio_continue_rx(struct serio *serio) } /* - * Use the following functions to pin serio's driver in process context + * Use the following fucntions to pin serio's driver in process context */ static inline int serio_pin_driver(struct serio *serio) { - return mutex_lock_interruptible(&serio->drv_mutex); + return down_interruptible(&serio->drv_sem); } static inline void serio_pin_driver_uninterruptible(struct serio *serio) { - mutex_lock(&serio->drv_mutex); + down(&serio->drv_sem); } static inline void serio_unpin_driver(struct serio *serio) { - mutex_unlock(&serio->drv_mutex); + up(&serio->drv_sem); }