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: Peter Chen <peter.chen@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
20831ad239
commit
956227120f
1 changed files with 1 additions and 1 deletions
|
@ -192,12 +192,12 @@ int usb_create_ep_devs(struct device *parent,
|
|||
ep_dev->dev.parent = parent;
|
||||
ep_dev->dev.release = ep_device_release;
|
||||
dev_set_name(&ep_dev->dev, "ep_%02x", endpoint->desc.bEndpointAddress);
|
||||
device_enable_async_suspend(&ep_dev->dev);
|
||||
|
||||
retval = device_register(&ep_dev->dev);
|
||||
if (retval)
|
||||
goto error_register;
|
||||
|
||||
device_enable_async_suspend(&ep_dev->dev);
|
||||
endpoint->ep_dev = ep_dev;
|
||||
return retval;
|
||||
|
||||
|
|
Loading…
Reference in a new issue