Add changes from the Linux-2.6 tree.
[linux-2.6.git] / include / asm-parisc / semaphore.h
index f78bb2e..d45827a 100644 (file)
@@ -49,9 +49,6 @@ struct semaphore {
        .wait           = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait)    \
 }
 
-#define __MUTEX_INITIALIZER(name) \
-       __SEMAPHORE_INITIALIZER(name,1)
-
 #define __DECLARE_SEMAPHORE_GENERIC(name,count) \
        struct semaphore name = __SEMAPHORE_INITIALIZER(name,count)
 
@@ -118,7 +115,8 @@ extern __inline__ int down_interruptible(struct semaphore * sem)
  */
 extern __inline__ int down_trylock(struct semaphore * sem)
 {
-       int flags, count;
+       unsigned long flags;
+       int count;
 
        spin_lock_irqsave(&sem->sentry, flags);
        count = sem->count - 1;
@@ -134,7 +132,8 @@ extern __inline__ int down_trylock(struct semaphore * sem)
  */
 extern __inline__ void up(struct semaphore * sem)
 {
-       int flags;
+       unsigned long flags;
+
        spin_lock_irqsave(&sem->sentry, flags);
        if (sem->count < 0) {
                __up(sem);