diff options
Diffstat (limited to 'include/asm-sparc64/spinlock.h')
-rw-r--r-- | include/asm-sparc64/spinlock.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/asm-sparc64/spinlock.h b/include/asm-sparc64/spinlock.h index d1f91a4f24ae..db7581bdb531 100644 --- a/include/asm-sparc64/spinlock.h +++ b/include/asm-sparc64/spinlock.h | |||
@@ -44,7 +44,7 @@ typedef struct { | |||
44 | 44 | ||
45 | #define spin_unlock_wait(lp) \ | 45 | #define spin_unlock_wait(lp) \ |
46 | do { membar("#LoadLoad"); \ | 46 | do { membar("#LoadLoad"); \ |
47 | } while(lp->lock) | 47 | } while((lp)->lock) |
48 | 48 | ||
49 | static inline void _raw_spin_lock(spinlock_t *lock) | 49 | static inline void _raw_spin_lock(spinlock_t *lock) |
50 | { | 50 | { |
@@ -149,7 +149,7 @@ typedef struct { | |||
149 | unsigned int break_lock; | 149 | unsigned int break_lock; |
150 | #endif | 150 | #endif |
151 | } rwlock_t; | 151 | } rwlock_t; |
152 | #define RW_LOCK_UNLOCKED {0,} | 152 | #define RW_LOCK_UNLOCKED (rwlock_t) {0,} |
153 | #define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0) | 153 | #define rwlock_init(lp) do { *(lp) = RW_LOCK_UNLOCKED; } while(0) |
154 | 154 | ||
155 | static void inline __read_lock(rwlock_t *lock) | 155 | static void inline __read_lock(rwlock_t *lock) |