diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-23 10:47:01 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-23 10:47:01 -0700 |
commit | a800faec1b21d7133b5f0c8c6dac593b7c4e118d (patch) | |
tree | e190372af6ee0a2a64e9ae70690b18b48d66be00 /arch/cris/include | |
parent | c488eef8154b36cce905624577183dc1fa8f6da0 (diff) | |
parent | 7b994836f09fc3ce7d073ad6f8259a1a84003e02 (diff) |
Merge branch 'for-linus' of git://www.jni.nu/cris
* 'for-linus' of git://www.jni.nu/cris:
CRISv10: remove redundant tests on unsigned
CRISv32: irq.c - Move end brace outside #endif
CRISv32: Fix potential null reference in cryptocop driver.
CRISv32: Add arch optimized strcmp.
CRIS: assignment/is equal confusion
Diffstat (limited to 'arch/cris/include')
-rw-r--r-- | arch/cris/include/arch-v32/arch/spinlock.h | 6 | ||||
-rw-r--r-- | arch/cris/include/asm/string.h | 6 |
2 files changed, 9 insertions, 3 deletions
diff --git a/arch/cris/include/arch-v32/arch/spinlock.h b/arch/cris/include/arch-v32/arch/spinlock.h index 129756b9666..367a53ea10c 100644 --- a/arch/cris/include/arch-v32/arch/spinlock.h +++ b/arch/cris/include/arch-v32/arch/spinlock.h @@ -78,7 +78,7 @@ static inline void __raw_write_lock(raw_rwlock_t *rw) { __raw_spin_lock(&rw->slock); while (rw->lock != RW_LOCK_BIAS); - rw->lock == 0; + rw->lock = 0; __raw_spin_unlock(&rw->slock); } @@ -93,7 +93,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) { __raw_spin_lock(&rw->slock); while (rw->lock != RW_LOCK_BIAS); - rw->lock == RW_LOCK_BIAS; + rw->lock = RW_LOCK_BIAS; __raw_spin_unlock(&rw->slock); } @@ -114,7 +114,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) int ret = 0; __raw_spin_lock(&rw->slock); if (rw->lock == RW_LOCK_BIAS) { - rw->lock == 0; + rw->lock = 0; ret = 1; } __raw_spin_unlock(&rw->slock); diff --git a/arch/cris/include/asm/string.h b/arch/cris/include/asm/string.h index 691190e99a2..d5db39f9eea 100644 --- a/arch/cris/include/asm/string.h +++ b/arch/cris/include/asm/string.h @@ -11,4 +11,10 @@ extern void *memcpy(void *, const void *, size_t); #define __HAVE_ARCH_MEMSET extern void *memset(void *, int, size_t); +#ifdef CONFIG_ETRAX_ARCH_V32 +/* For v32 we provide strcmp. */ +#define __HAVE_ARCH_STRCMP +extern int strcmp(const char *s1, const char *s2); +#endif + #endif |