diff options
Diffstat (limited to 'drivers/tty/tty_ldsem.c')
| -rw-r--r-- | drivers/tty/tty_ldsem.c | 19 |
1 files changed, 1 insertions, 18 deletions
diff --git a/drivers/tty/tty_ldsem.c b/drivers/tty/tty_ldsem.c index ce8291053af3..4e18031a5ca3 100644 --- a/drivers/tty/tty_ldsem.c +++ b/drivers/tty/tty_ldsem.c @@ -163,7 +163,7 @@ down_read_failed(struct ld_semaphore *sem, long count, long timeout) /* * Try to reverse the lock attempt but if the count has changed - * so that reversing fails, check if there are are no waiters, + * so that reversing fails, check if there are no waiters, * and early-out if not */ do { @@ -367,23 +367,6 @@ int __sched ldsem_down_write(struct ld_semaphore *sem, long timeout) } /* - * trylock for writing -- returns 1 if successful, 0 if contention - */ -int ldsem_down_write_trylock(struct ld_semaphore *sem) -{ - long count = atomic_long_read(&sem->count); - - while ((count & LDSEM_ACTIVE_MASK) == 0) { - if (atomic_long_try_cmpxchg(&sem->count, &count, count + LDSEM_WRITE_BIAS)) { - rwsem_acquire(&sem->dep_map, 0, 1, _RET_IP_); - lock_acquired(&sem->dep_map, _RET_IP_); - return 1; - } - } - return 0; -} - -/* * release a read lock */ void ldsem_up_read(struct ld_semaphore *sem) |
