]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
CRIS v32: Adjust arch-v32/atomic.h for new spinlock/rwlock infrastructure
authorJesper Nilsson <jesper.nilsson@axis.com>
Mon, 28 Jan 2008 15:53:19 +0000 (16:53 +0100)
committerJesper Nilsson <jesper.nilsson@axis.com>
Fri, 8 Feb 2008 10:06:38 +0000 (11:06 +0100)
include/asm-cris/arch-v32/atomic.h

index bbfb7a5ae315cd43c244514b4bcc095007ff5a5a..852ceff8013f66d060aab842fb04d4af35d2ba1b 100644 (file)
@@ -1,7 +1,7 @@
 #ifndef __ASM_CRIS_ARCH_ATOMIC__
 #define __ASM_CRIS_ARCH_ATOMIC__
 
-#include <asm/system.h>
+#include <linux/spinlock_types.h>
 
 extern void cris_spin_unlock(void *l, int val);
 extern void cris_spin_lock(void *l);
@@ -18,15 +18,15 @@ extern spinlock_t cris_atomic_locks[];
 
 #define cris_atomic_save(addr, flags) \
   local_irq_save(flags); \
-  cris_spin_lock((void*)&cris_atomic_locks[HASH_ADDR(addr)].lock);
+  cris_spin_lock((void *)&cris_atomic_locks[HASH_ADDR(addr)].raw_lock.slock);
 
 #define cris_atomic_restore(addr, flags) \
   { \
     spinlock_t *lock = (void*)&cris_atomic_locks[HASH_ADDR(addr)]; \
     __asm__ volatile ("move.d %1,%0" \
-                         : "=m" (lock->lock) \
-                         : "r" (1) \
-                         : "memory"); \
+                       : "=m" (lock->raw_lock.slock) \
+                       : "r" (1) \
+                       : "memory"); \
     local_irq_restore(flags); \
   }