Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Arnd Bergmann and committed by
Jesper Nilsson
329fddd7 64d8ad93

+6 -2
+3 -1
arch/cris/arch-v10/drivers/sync_serial.c
··· 22 22 #include <linux/init.h> 23 23 #include <linux/mutex.h> 24 24 #include <linux/timer.h> 25 + #include <linux/wait.h> 25 26 #include <asm/irq.h> 26 27 #include <asm/dma.h> 27 28 #include <asm/io.h> ··· 1137 1136 if (file->f_flags & O_NONBLOCK) 1138 1137 return -EAGAIN; 1139 1138 1140 - interruptible_sleep_on(&port->in_wait_q); 1139 + wait_event_interruptible(port->in_wait_q, 1140 + !(start == end && !port->full)); 1141 1141 if (signal_pending(current)) 1142 1142 return -EINTR; 1143 1143
+3 -1
arch/cris/arch-v32/drivers/sync_serial.c
··· 19 19 #include <linux/init.h> 20 20 #include <linux/timer.h> 21 21 #include <linux/spinlock.h> 22 + #include <linux/wait.h> 22 23 23 24 #include <asm/io.h> 24 25 #include <dma.h> ··· 1145 1144 if (file->f_flags & O_NONBLOCK) 1146 1145 return -EAGAIN; 1147 1146 1148 - interruptible_sleep_on(&port->in_wait_q); 1147 + wait_event_interruptible(port->in_wait_q, 1148 + !(start == end && !port->full)); 1149 1149 if (signal_pending(current)) 1150 1150 return -EINTR; 1151 1151