summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsurinder <srplsnh@gmail.com>2008-05-28 10:51:16 +0200
committerRussell King <rmk+kernel@arm.linux.org.uk>2008-06-02 14:44:17 +0200
commit1e5c594607778f551b729577b046ee5d9333cfb5 (patch)
treed153988fa057faa33e747b94dbc73b5e9075c105
parent[ARM] 5070/1: pxa: add GPIO104_PSKTSEL to pxa27x MFP configuration (diff)
downloadlinux-1e5c594607778f551b729577b046ee5d9333cfb5.tar.xz
linux-1e5c594607778f551b729577b046ee5d9333cfb5.zip
[ARM] 5067/1: _raw_write_can_lock macro bugfix
The current __raw_write_can_lock macro tests whether the lock can be locked by checking if it is equal to 0x80000000, whereas the lock should be lockable if its value is 0 i.e. unlocked state is represented by 0. Hence the macro should test the value of lock against 0 and not 0x80000000. Signed-off-by: Surinder Pal Singh <srplsnh@gmail.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--include/asm-arm/spinlock.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/asm-arm/spinlock.h b/include/asm-arm/spinlock.h
index 800ba5254daf..2b41ebbfa7ff 100644
--- a/include/asm-arm/spinlock.h
+++ b/include/asm-arm/spinlock.h
@@ -142,7 +142,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw)
}
/* write_can_lock - would write_trylock() succeed? */
-#define __raw_write_can_lock(x) ((x)->lock == 0x80000000)
+#define __raw_write_can_lock(x) ((x)->lock == 0)
/*
* Read locks are a bit more hairy: