diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-01-02 13:07:37 +0100 |
---|---|---|
committer | Jesper Nilsson <jespern@axis.com> | 2014-01-09 10:50:50 +0100 |
commit | 329fddd7b60cf6aed53cdb6fdc8e64117b8e8bc6 (patch) | |
tree | 7e4e54cfa9defbb96c73bad6ec49c0d391a6ba43 /arch/cris/arch-v32/drivers | |
parent | 64d8ad933d06f3d5070db8eb855cdfc0a80b595d (diff) | |
download | linux-329fddd7b60cf6aed53cdb6fdc8e64117b8e8bc6.tar.gz linux-329fddd7b60cf6aed53cdb6fdc8e64117b8e8bc6.tar.bz2 linux-329fddd7b60cf6aed53cdb6fdc8e64117b8e8bc6.zip |
cris: sync_serial: remove interruptible_sleep_on
sleep_on and its variants are racy and going away. This replaces
the two uses in the cris sync_serial drivers with the equivalent
but race-free wait_event_interruptible.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: Mikael Starvik <starvik@axis.com>
Cc: linux-cris-kernel@axis.com
Signed-off-by: Jesper Nilsson <jespern@axis.com>
Diffstat (limited to 'arch/cris/arch-v32/drivers')
-rw-r--r-- | arch/cris/arch-v32/drivers/sync_serial.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/arch/cris/arch-v32/drivers/sync_serial.c b/arch/cris/arch-v32/drivers/sync_serial.c index 219f704e3221..bbb806b68838 100644 --- a/arch/cris/arch-v32/drivers/sync_serial.c +++ b/arch/cris/arch-v32/drivers/sync_serial.c @@ -19,6 +19,7 @@ #include <linux/init.h> #include <linux/timer.h> #include <linux/spinlock.h> +#include <linux/wait.h> #include <asm/io.h> #include <dma.h> @@ -1144,7 +1145,8 @@ static ssize_t sync_serial_read(struct file * file, char * buf, if (file->f_flags & O_NONBLOCK) return -EAGAIN; - interruptible_sleep_on(&port->in_wait_q); + wait_event_interruptible(port->in_wait_q, + !(start == end && !port->full)); if (signal_pending(current)) return -EINTR; |