diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-23 13:47:01 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-23 13:47:01 -0400 |
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 129756b96661..367a53ea10c5 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) | |||
78 | { | 78 | { |
79 | __raw_spin_lock(&rw->slock); | 79 | __raw_spin_lock(&rw->slock); |
80 | while (rw->lock != RW_LOCK_BIAS); | 80 | while (rw->lock != RW_LOCK_BIAS); |
81 | rw->lock == 0; | 81 | rw->lock = 0; |
82 | __raw_spin_unlock(&rw->slock); | 82 | __raw_spin_unlock(&rw->slock); |
83 | } | 83 | } |
84 | 84 | ||
@@ -93,7 +93,7 @@ static inline void __raw_write_unlock(raw_rwlock_t *rw) | |||
93 | { | 93 | { |
94 | __raw_spin_lock(&rw->slock); | 94 | __raw_spin_lock(&rw->slock); |
95 | while (rw->lock != RW_LOCK_BIAS); | 95 | while (rw->lock != RW_LOCK_BIAS); |
96 | rw->lock == RW_LOCK_BIAS; | 96 | rw->lock = RW_LOCK_BIAS; |
97 | __raw_spin_unlock(&rw->slock); | 97 | __raw_spin_unlock(&rw->slock); |
98 | } | 98 | } |
99 | 99 | ||
@@ -114,7 +114,7 @@ static inline int __raw_write_trylock(raw_rwlock_t *rw) | |||
114 | int ret = 0; | 114 | int ret = 0; |
115 | __raw_spin_lock(&rw->slock); | 115 | __raw_spin_lock(&rw->slock); |
116 | if (rw->lock == RW_LOCK_BIAS) { | 116 | if (rw->lock == RW_LOCK_BIAS) { |
117 | rw->lock == 0; | 117 | rw->lock = 0; |
118 | ret = 1; | 118 | ret = 1; |
119 | } | 119 | } |
120 | __raw_spin_unlock(&rw->slock); | 120 | __raw_spin_unlock(&rw->slock); |
diff --git a/arch/cris/include/asm/string.h b/arch/cris/include/asm/string.h index 691190e99a27..d5db39f9eea1 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); | |||
11 | #define __HAVE_ARCH_MEMSET | 11 | #define __HAVE_ARCH_MEMSET |
12 | extern void *memset(void *, int, size_t); | 12 | extern void *memset(void *, int, size_t); |
13 | 13 | ||
14 | #ifdef CONFIG_ETRAX_ARCH_V32 | ||
15 | /* For v32 we provide strcmp. */ | ||
16 | #define __HAVE_ARCH_STRCMP | ||
17 | extern int strcmp(const char *s1, const char *s2); | ||
18 | #endif | ||
19 | |||
14 | #endif | 20 | #endif |