diff options
author | Arnd Bergmann <arnd@arndb.de> | 2014-01-02 07:07:35 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-01-09 13:41:44 -0500 |
commit | 310df69c26f93c49bb176e95e4eb42ece58a5fd2 (patch) | |
tree | b4beda901d5f537d0a33070f37391f2a28be8aa5 | |
parent | baeae584dbe5117fbc1096a81ae4e8bb6e2dd897 (diff) |
staging: panel: fix interruptible_sleep_on race
interruptible_sleep_on is racy and going away. This replaces the one
caller in the panel driver with the appropriate wait_event_interruptible
variant.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: devel@driverdev.osuosl.org
Cc: Willy Tarreau <willy@meta-x.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/panel/panel.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/panel/panel.c b/drivers/staging/panel/panel.c index cbc15c120981..ec4b1fd14021 100644 --- a/drivers/staging/panel/panel.c +++ b/drivers/staging/panel/panel.c | |||
@@ -1590,8 +1590,8 @@ static ssize_t keypad_read(struct file *file, | |||
1590 | if (file->f_flags & O_NONBLOCK) | 1590 | if (file->f_flags & O_NONBLOCK) |
1591 | return -EAGAIN; | 1591 | return -EAGAIN; |
1592 | 1592 | ||
1593 | interruptible_sleep_on(&keypad_read_wait); | 1593 | if (wait_event_interruptible(keypad_read_wait, |
1594 | if (signal_pending(current)) | 1594 | keypad_buflen != 0)) |
1595 | return -EINTR; | 1595 | return -EINTR; |
1596 | } | 1596 | } |
1597 | 1597 | ||