From: Kyle McMartin Date: Sun, 26 Nov 2006 23:56:56 +0000 (-0500) Subject: [PATCH] Fix incorrent type of flags in X-Git-Tag: v2.6.19~17 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=c9c3b86f2ab79f7f6e87eb735f9cc4508b73fc48;p=linux-2.6-omap-h63xx.git [PATCH] Fix incorrent type of flags in I still think using BUILD_BUG_ON() is unacceptable, especially given how vague the error message was. Signed-off-by: Kyle McMartin [ And I already removed gthe BUILD_BUG_ON() in the previous commit ] Signed-off-by: Linus Torvalds --- diff --git a/include/asm-parisc/semaphore.h b/include/asm-parisc/semaphore.h index c9ee41cd070..d45827a21f9 100644 --- a/include/asm-parisc/semaphore.h +++ b/include/asm-parisc/semaphore.h @@ -115,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; @@ -131,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);