linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / include / linux / serio.h
index 41bdd5d..aa4d649 100644 (file)
@@ -18,7 +18,6 @@
 #include <linux/interrupt.h>
 #include <linux/list.h>
 #include <linux/spinlock.h>
-#include <linux/mutex.h>
 #include <linux/device.h>
 #include <linux/mod_devicetable.h>
 
@@ -41,10 +40,9 @@ struct serio {
        void (*stop)(struct serio *);
 
        struct serio *parent, *child;
-       unsigned int depth;             /* level of nesting in serio hierarchy */
 
        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 */
@@ -121,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)
@@ -135,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)
@@ -149,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);
 }