aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/core/hub.c3
-rw-r--r--drivers/usb/storage/usb.c5
2 files changed, 2 insertions, 6 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);
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index 3451e8d03ab0..ac6114eea0c3 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -907,12 +907,9 @@ static int usb_stor_scan_thread(void * __us)
907 if (delay_use > 0) { 907 if (delay_use > 0) {
908 printk(KERN_DEBUG "usb-storage: waiting for device " 908 printk(KERN_DEBUG "usb-storage: waiting for device "
909 "to settle before scanning\n"); 909 "to settle before scanning\n");
910retry: 910 wait_event_freezable_timeout(us->delay_wait,
911 wait_event_interruptible_timeout(us->delay_wait,
912 test_bit(US_FLIDX_DISCONNECTING, &us->flags), 911 test_bit(US_FLIDX_DISCONNECTING, &us->flags),
913 delay_use * HZ); 912 delay_use * HZ);
914 if (try_to_freeze())
915 goto retry;
916 } 913 }
917 914
918 /* If the device is still connected, perform the scanning */ 915 /* If the device is still connected, perform the scanning */