Commit 4b266e5f authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman

staging: gdm72xx: fix interruptible_sleep_on race

interruptible_sleep_on is racy and going away. This replaces the
use in the gdm72xx driver with the appropriate
wait_event_interruptible_lock_irq.
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d6f52500
...@@ -780,9 +780,10 @@ static int k_mode_thread(void *arg) ...@@ -780,9 +780,10 @@ static int k_mode_thread(void *arg)
spin_lock_irqsave(&k_lock, flags2); spin_lock_irqsave(&k_lock, flags2);
} }
wait_event_interruptible_lock_irq(k_wait,
!list_empty(&k_list) || k_mode_stop,
k_lock);
spin_unlock_irqrestore(&k_lock, flags2); spin_unlock_irqrestore(&k_lock, flags2);
interruptible_sleep_on(&k_wait);
} }
return 0; return 0;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment