diff options
Diffstat (limited to 'arch/sparc')
-rw-r--r-- | arch/sparc/lib/atomic32.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/sparc/lib/atomic32.c b/arch/sparc/lib/atomic32.c index 617d29832e19..cbddeb38ffda 100644 --- a/arch/sparc/lib/atomic32.c +++ b/arch/sparc/lib/atomic32.c | |||
@@ -124,10 +124,10 @@ unsigned long __cmpxchg_u32(volatile u32 *ptr, u32 old, u32 new) | |||
124 | unsigned long flags; | 124 | unsigned long flags; |
125 | u32 prev; | 125 | u32 prev; |
126 | 126 | ||
127 | spin_lock_irqsave(ATOMIC_HASH(addr), flags); | 127 | spin_lock_irqsave(ATOMIC_HASH(ptr), flags); |
128 | if ((prev = *ptr) == old) | 128 | if ((prev = *ptr) == old) |
129 | *ptr = new; | 129 | *ptr = new; |
130 | spin_unlock_irqrestore(ATOMIC_HASH(addr), flags); | 130 | spin_unlock_irqrestore(ATOMIC_HASH(ptr), flags); |
131 | 131 | ||
132 | return (unsigned long)prev; | 132 | return (unsigned long)prev; |
133 | } | 133 | } |