提交 0517587e 编写于 作者: G Greg Kroah-Hartman

[PATCH] USB: get USB suspend to work again

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: NGreg Kroah-Hartman <gregkh@suse.de>
上级 c71bd694
...@@ -991,6 +991,8 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe, ...@@ -991,6 +991,8 @@ void usb_buffer_unmap_sg (struct usb_device *dev, unsigned pipe,
static int verify_suspended(struct device *dev, void *unused) 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; return (dev->power.power_state.event == PM_EVENT_ON) ? -EBUSY : 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册