aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/core
diff options
context:
space:
mode:
authorRafael J. Wysocki <rjw@sisk.pl>2007-10-18 06:04:45 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-10-18 17:37:19 -0400
commite42837bcd35b75bb59ae5d3e62f87be1aeeb05c3 (patch)
treeaa9666b080dc75ef3fa27992f042a422f7a979b7 /drivers/usb/core
parent2e1318956ce6bf149af5c5e98499b5cd99f99c89 (diff)
freezer: introduce freezer-friendly waiting macros
Introduce freezer-friendly wrappers around wait_event_interruptible() and wait_event_interruptible_timeout(), originally defined in <linux/wait.h>, to be used in freezable kernel threads. Make some of the freezable kernel threads use them. This is necessary for the freezer to stop sending signals to kernel threads, which is implemented in the next patch. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Pavel Machek <pavel@ucw.cz> Cc: Nigel Cunningham <nigel@nigel.suspend2.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r--drivers/usb/core/hub.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 60a8f55a0cc7..036c3dea855e 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -2870,10 +2870,9 @@ static int hub_thread(void *__unused)
2870 set_freezable(); 2870 set_freezable();
2871 do { 2871 do {
2872 hub_events(); 2872 hub_events();
2873 wait_event_interruptible(khubd_wait, 2873 wait_event_freezable(khubd_wait,
2874 !list_empty(&hub_event_list) || 2874 !list_empty(&hub_event_list) ||
2875 kthread_should_stop()); 2875 kthread_should_stop());
2876 try_to_freeze();
2877 } while (!kthread_should_stop() || !list_empty(&hub_event_list)); 2876 } while (!kthread_should_stop() || !list_empty(&hub_event_list));
2878 2877
2879 pr_debug("%s: khubd exiting\n", usbcore_name); 2878 pr_debug("%s: khubd exiting\n", usbcore_name);