Commit 784a6e1c authored by Alan Stern's avatar Alan Stern Committed by Greg Kroah-Hartman

USB: interface PM state

This patch (as880) strives to keep the PM core's idea of a USB
interface's power state in synch with usbcore's own idea.  In the end
this doesn't really matter, but it's better to be consistent.
Signed-off-by: default avatarAlan Stern <stern@rowland.harvard.edu>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f6ace2c9
...@@ -879,8 +879,6 @@ static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg) ...@@ -879,8 +879,6 @@ static int usb_suspend_interface(struct usb_interface *intf, pm_message_t msg)
done: done:
// dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status); // dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
if (status == 0)
intf->dev.power.power_state.event = msg.event;
return status; return status;
} }
...@@ -920,8 +918,6 @@ static int usb_resume_interface(struct usb_interface *intf) ...@@ -920,8 +918,6 @@ static int usb_resume_interface(struct usb_interface *intf)
done: done:
// dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status); // dev_dbg(&intf->dev, "%s: status %d\n", __FUNCTION__, status);
if (status == 0)
intf->dev.power.power_state.event = PM_EVENT_ON;
return status; return status;
} }
......
...@@ -100,11 +100,13 @@ static inline int is_usb_device_driver(struct device_driver *drv) ...@@ -100,11 +100,13 @@ static inline int is_usb_device_driver(struct device_driver *drv)
static inline void mark_active(struct usb_interface *f) static inline void mark_active(struct usb_interface *f)
{ {
f->is_active = 1; f->is_active = 1;
f->dev.power.power_state.event = PM_EVENT_ON;
} }
static inline void mark_quiesced(struct usb_interface *f) static inline void mark_quiesced(struct usb_interface *f)
{ {
f->is_active = 0; f->is_active = 0;
f->dev.power.power_state.event = PM_EVENT_SUSPEND;
} }
static inline int is_active(const struct usb_interface *f) static inline int is_active(const struct usb_interface *f)
......
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