diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-02 09:58:49 -0400 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2010-11-02 09:58:49 -0400 |
commit | 9e3be1edbe5ca57df51140b523168237b3a01f4d (patch) | |
tree | a72c0ec1ce0fbcdcd12ecb6aad9bedcc94b94f9d /include/asm-generic/system.h | |
parent | 473f89fff76568a9f30c53b458e6323d48b0ab95 (diff) | |
parent | 29c798fecb9b846b363b0a02fa662ff42fc19426 (diff) |
Merge branch 'for-2.6.37' into HEAD
WARN() fix from Joe moved.
Conflicts:
sound/soc/codecs/wm_hubs.c
Diffstat (limited to 'include/asm-generic/system.h')
-rw-r--r-- | include/asm-generic/system.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/include/asm-generic/system.h b/include/asm-generic/system.h index efa403b5e12..4b0b9cbbfae 100644 --- a/include/asm-generic/system.h +++ b/include/asm-generic/system.h @@ -21,6 +21,7 @@ #include <linux/irqflags.h> #include <asm/cmpxchg-local.h> +#include <asm/cmpxchg.h> struct task_struct; @@ -136,25 +137,6 @@ unsigned long __xchg(unsigned long x, volatile void *ptr, int size) #define xchg(ptr, x) \ ((__typeof__(*(ptr))) __xchg((unsigned long)(x), (ptr), sizeof(*(ptr)))) -static inline unsigned long __cmpxchg(volatile unsigned long *m, - unsigned long old, unsigned long new) -{ - unsigned long retval; - unsigned long flags; - - local_irq_save(flags); - retval = *m; - if (retval == old) - *m = new; - local_irq_restore(flags); - return retval; -} - -#define cmpxchg(ptr, o, n) \ - ((__typeof__(*(ptr))) __cmpxchg((unsigned long *)(ptr), \ - (unsigned long)(o), \ - (unsigned long)(n))) - #endif /* !__ASSEMBLY__ */ #endif /* __KERNEL__ */ |