Skip to content

Commit

Permalink
usb: set ep_dev async suspend should be later than device_initialize
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Chen authored and Greg Kroah-Hartman committed Jan 23, 2011
1 parent 20831ad commit 9562271
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/usb/core/endpoint.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 9562271

Please sign in to comment.