[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 5153107..fb488c8 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;
 }