X-Git-Url: http://git.samba.org/samba.git/?p=sfrench%2Fcifs-2.6.git;a=blobdiff_plain;f=drivers%2Fusb%2Fcore%2Fhub.c;h=13b326a13377051e54cf7824adffad8ef21fd1c0;hp=d20cb545a6e4fd0bbc67634251f666d4a0eedfe9;hb=92d499d991ec4f5cbd00d6f33967eab9d3ee8d6c;hpb=65a6ec0d72a07f16719e9b7a96e1c4bae044b591 diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index d20cb545a6e4..13b326a13377 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c @@ -335,7 +335,7 @@ static void kick_khubd(struct usb_hub *hub) to_usb_interface(hub->intfdev)->pm_usage_cnt = 1; spin_lock_irqsave(&hub_event_lock, flags); - if (!hub->disconnected & list_empty(&hub->event_list)) { + if (!hub->disconnected && list_empty(&hub->event_list)) { list_add_tail(&hub->event_list, &hub_event_list); wake_up(&khubd_wait); } @@ -1407,7 +1407,11 @@ fail: /** - * Similar to usb_disconnect() + * usb_deauthorize_device - deauthorize a device (usbcore-internal) + * @usb_dev: USB device + * + * Move the USB device to a very basic state where interfaces are disabled + * and the device is in fact unconfigured and unusable. * * We share a lock (that we have) with device_del(), so we need to * defer its call. @@ -2866,10 +2870,9 @@ static int hub_thread(void *__unused) set_freezable(); do { hub_events(); - wait_event_interruptible(khubd_wait, + wait_event_freezable(khubd_wait, !list_empty(&hub_event_list) || kthread_should_stop()); - try_to_freeze(); } while (!kthread_should_stop() || !list_empty(&hub_event_list)); pr_debug("%s: khubd exiting\n", usbcore_name);