Commit 95622712 authored by Peter Chen's avatar Peter Chen Committed by Greg Kroah-Hartman

usb: set ep_dev async suspend should be later than device_initialize

The dev->power.async_suspend can only be set at the condition of
dev->power.status is DPM_ON. The dev->power.status will be initialized
as DPM_ON at device_initialize.
Signed-off-by: default avatarPeter Chen <peter.chen@freescale.com>
Acked-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 20831ad2
...@@ -192,12 +192,12 @@ int usb_create_ep_devs(struct device *parent, ...@@ -192,12 +192,12 @@ int usb_create_ep_devs(struct device *parent,
ep_dev->dev.parent = parent; ep_dev->dev.parent = parent;
ep_dev->dev.release = ep_device_release; ep_dev->dev.release = ep_device_release;
dev_set_name(&ep_dev->dev, "ep_%02x", endpoint->desc.bEndpointAddress); dev_set_name(&ep_dev->dev, "ep_%02x", endpoint->desc.bEndpointAddress);
device_enable_async_suspend(&ep_dev->dev);
retval = device_register(&ep_dev->dev); retval = device_register(&ep_dev->dev);
if (retval) if (retval)
goto error_register; goto error_register;
device_enable_async_suspend(&ep_dev->dev);
endpoint->ep_dev = ep_dev; endpoint->ep_dev = ep_dev;
return retval; return retval;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment