]> Pileus Git - ~andy/linux/commitdiff
[PATCH] USB: get USB suspend to work again
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 22 Jun 2006 20:29:52 +0000 (13:29 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Jun 2006 05:54:23 +0000 (22:54 -0700)
Yeah, it's a hack, but it is only temporary until Alan's patches
reworking this area make it in.  We really should not care what devices
below us are doing, especially when we do not really know what type of
devices they are.  This patch relies on the fact that the endpoint
devices do not have a driver assigned to us.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/usb.c

index 515310751303752d37390357d8bc9592e20e2592..fb488c8a860c9fc1ee8bc0605a501bd3de2d6e5a 100644 (file)
@@ -991,6 +991,8 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe,
 
 static int verify_suspended(struct device *dev, void *unused)
 {
+       if (dev->driver == NULL)
+               return 0;
        return (dev->power.power_state.event == PM_EVENT_ON) ? -EBUSY : 0;
 }