ldsem_cmpxchg() should use cmpxchg() not atomic_long_cmpxchg() since the variable it is wangling isn't an atomic_long_t.
Signed-off-by: David Howells <[email protected]> cc: Peter Hurley <[email protected]> cc: Greg Kroah-Hartman <[email protected]> --- drivers/tty/tty_ldsem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index 1bf8ed13f827..dc27b285ba4f 100644 --- a/drivers/tty/tty_ldsem.c +++ b/drivers/tty/tty_ldsem.c @@ -86,7 +86,7 @@ static inline long ldsem_atomic_update(long delta, struct ld_semaphore *sem) */ static inline int ldsem_cmpxchg(long *old, long new, struct ld_semaphore *sem) { - long tmp = atomic_long_cmpxchg(&sem->count, *old, new); + long tmp = cmpxchg(&sem->count, *old, new); if (tmp == *old) { *old = new; return 1;

