diff options
Diffstat (limited to 'drivers/usb')
| -rw-r--r-- | drivers/usb/core/hub.c | 2 | ||||
| -rw-r--r-- | drivers/usb/gadget/file_storage.c | 3 | ||||
| -rw-r--r-- | drivers/usb/storage/usb.c | 4 |
3 files changed, 3 insertions, 6 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index d2d648ee8640..a8d879a85d04 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
| @@ -2808,7 +2808,7 @@ static int hub_thread(void *__unused) | |||
| 2808 | do { | 2808 | do { |
| 2809 | hub_events(); | 2809 | hub_events(); |
| 2810 | wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); | 2810 | wait_event_interruptible(khubd_wait, !list_empty(&hub_event_list)); |
| 2811 | try_to_freeze(PF_FREEZE); | 2811 | try_to_freeze(); |
| 2812 | } while (!signal_pending(current)); | 2812 | } while (!signal_pending(current)); |
| 2813 | 2813 | ||
| 2814 | pr_debug ("%s: khubd exiting\n", usbcore_name); | 2814 | pr_debug ("%s: khubd exiting\n", usbcore_name); |
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c index 037a7f163822..a9be85103d23 100644 --- a/drivers/usb/gadget/file_storage.c +++ b/drivers/usb/gadget/file_storage.c | |||
| @@ -1554,8 +1554,7 @@ static int sleep_thread(struct fsg_dev *fsg) | |||
| 1554 | rc = wait_event_interruptible(fsg->thread_wqh, | 1554 | rc = wait_event_interruptible(fsg->thread_wqh, |
| 1555 | fsg->thread_wakeup_needed); | 1555 | fsg->thread_wakeup_needed); |
| 1556 | fsg->thread_wakeup_needed = 0; | 1556 | fsg->thread_wakeup_needed = 0; |
| 1557 | if (current->flags & PF_FREEZE) | 1557 | try_to_freeze(); |
| 1558 | refrigerator(PF_FREEZE); | ||
| 1559 | return (rc ? -EINTR : 0); | 1558 | return (rc ? -EINTR : 0); |
| 1560 | } | 1559 | } |
| 1561 | 1560 | ||
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c index 35c1ca6b5a8e..77e7fc258aa2 100644 --- a/drivers/usb/storage/usb.c +++ b/drivers/usb/storage/usb.c | |||
| @@ -847,10 +847,8 @@ retry: | |||
| 847 | wait_event_interruptible_timeout(us->delay_wait, | 847 | wait_event_interruptible_timeout(us->delay_wait, |
| 848 | test_bit(US_FLIDX_DISCONNECTING, &us->flags), | 848 | test_bit(US_FLIDX_DISCONNECTING, &us->flags), |
| 849 | delay_use * HZ); | 849 | delay_use * HZ); |
| 850 | if (current->flags & PF_FREEZE) { | 850 | if (try_to_freeze()) |
| 851 | refrigerator(PF_FREEZE); | ||
| 852 | goto retry; | 851 | goto retry; |
| 853 | } | ||
| 854 | } | 852 | } |
| 855 | 853 | ||
| 856 | /* If the device is still connected, perform the scanning */ | 854 | /* If the device is still connected, perform the scanning */ |
