diff options
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/driver.c | 12 | ||||
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 5 | ||||
-rw-r--r-- | drivers/usb/core/usb.h | 2 |
3 files changed, 4 insertions, 15 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index ebccdefcc6f2..2ea333a43d65 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -794,8 +794,6 @@ static int usb_suspend_device(struct usb_device *udev, pm_message_t msg) done: dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); - if (status == 0) - udev->dev.power.power_state.event = msg.event; return status; } @@ -824,10 +822,8 @@ static int usb_resume_device(struct usb_device *udev) done: dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); - if (status == 0) { + if (status == 0) udev->autoresume_disabled = 0; - udev->dev.power.power_state.event = PM_EVENT_ON; - } return status; } @@ -1180,8 +1176,7 @@ static int usb_resume_both(struct usb_device *udev) } } else { - /* Needed for setting udev->dev.power.power_state.event, - * for possible debugging message, and for reset_resume. */ + /* Needed for reset-resume */ status = usb_resume_device(udev); } @@ -1194,7 +1189,8 @@ static int usb_resume_both(struct usb_device *udev) done: dev_vdbg(&udev->dev, "%s: status %d\n", __FUNCTION__, status); - udev->reset_resume = 0; + if (!status) + udev->reset_resume = 0; return status; } diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 84760ddbc332..739407bb8492 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c @@ -73,7 +73,6 @@ int usb_hcd_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) if (pci_enable_device(dev) < 0) return -ENODEV; dev->current_state = PCI_D0; - dev->dev.power.power_state = PMSG_ON; if (!dev->irq) { dev_err(&dev->dev, @@ -302,8 +301,6 @@ int usb_hcd_pci_suspend(struct pci_dev *dev, pm_message_t message) done: if (retval == 0) { - dev->dev.power.power_state = PMSG_SUSPEND; - #ifdef CONFIG_PPC_PMAC /* Disable ASIC clocks for USB */ if (machine_is(powermac)) { @@ -406,8 +403,6 @@ int usb_hcd_pci_resume(struct pci_dev *dev) pci_set_master(dev); pci_restore_state(dev); - dev->dev.power.power_state = PMSG_ON; - clear_bit(HCD_FLAG_SAW_IRQ, &hcd->flags); if (hcd->driver->resume) { diff --git a/drivers/usb/core/usb.h b/drivers/usb/core/usb.h index 2375194a9d43..1bf8ccb9c58d 100644 --- a/drivers/usb/core/usb.h +++ b/drivers/usb/core/usb.h @@ -114,13 +114,11 @@ static inline int is_usb_device_driver(struct device_driver *drv) static inline void mark_active(struct usb_interface *f) { f->is_active = 1; - f->dev.power.power_state.event = PM_EVENT_ON; } static inline void mark_quiesced(struct usb_interface *f) { f->is_active = 0; - f->dev.power.power_state.event = PM_EVENT_SUSPEND; } static inline int is_active(const struct usb_interface *f) |