diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2009-11-13 11:53:59 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-12-11 14:55:21 -0500 |
commit | fb34d53752d5bec5acc73422e462a9c68aeeaa2a (patch) | |
tree | 6a395f2a0246cd3d721753c60af13e8f9b2e9c41 /drivers/usb/core | |
parent | 576a362ad2103da481e1f6e13de01f33d3d4c7b1 (diff) |
USB: remove the auto_pm flag
This patch (as1302) removes the auto_pm flag from struct usb_device.
The flag's only purpose was to distinguish between autosuspends and
external suspends, but that information is now available in the
pm_message_t argument passed to suspend methods.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/driver.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 4f864472c5c4..8016a296010e 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c | |||
@@ -1341,7 +1341,6 @@ static int usb_autopm_do_device(struct usb_device *udev, int inc_usage_cnt) | |||
1341 | int status = 0; | 1341 | int status = 0; |
1342 | 1342 | ||
1343 | usb_pm_lock(udev); | 1343 | usb_pm_lock(udev); |
1344 | udev->auto_pm = 1; | ||
1345 | udev->pm_usage_cnt += inc_usage_cnt; | 1344 | udev->pm_usage_cnt += inc_usage_cnt; |
1346 | WARN_ON(udev->pm_usage_cnt < 0); | 1345 | WARN_ON(udev->pm_usage_cnt < 0); |
1347 | if (inc_usage_cnt) | 1346 | if (inc_usage_cnt) |
@@ -1473,7 +1472,6 @@ static int usb_autopm_do_interface(struct usb_interface *intf, | |||
1473 | if (intf->condition == USB_INTERFACE_UNBOUND) | 1472 | if (intf->condition == USB_INTERFACE_UNBOUND) |
1474 | status = -ENODEV; | 1473 | status = -ENODEV; |
1475 | else { | 1474 | else { |
1476 | udev->auto_pm = 1; | ||
1477 | atomic_add(inc_usage_cnt, &intf->pm_usage_cnt); | 1475 | atomic_add(inc_usage_cnt, &intf->pm_usage_cnt); |
1478 | udev->last_busy = jiffies; | 1476 | udev->last_busy = jiffies; |
1479 | if (inc_usage_cnt >= 0 && | 1477 | if (inc_usage_cnt >= 0 && |
@@ -1707,7 +1705,6 @@ int usb_external_suspend_device(struct usb_device *udev, pm_message_t msg) | |||
1707 | 1705 | ||
1708 | do_unbind_rebind(udev, DO_UNBIND); | 1706 | do_unbind_rebind(udev, DO_UNBIND); |
1709 | usb_pm_lock(udev); | 1707 | usb_pm_lock(udev); |
1710 | udev->auto_pm = 0; | ||
1711 | status = usb_suspend_both(udev, msg); | 1708 | status = usb_suspend_both(udev, msg); |
1712 | usb_pm_unlock(udev); | 1709 | usb_pm_unlock(udev); |
1713 | return status; | 1710 | return status; |
@@ -1730,7 +1727,6 @@ int usb_external_resume_device(struct usb_device *udev, pm_message_t msg) | |||
1730 | int status; | 1727 | int status; |
1731 | 1728 | ||
1732 | usb_pm_lock(udev); | 1729 | usb_pm_lock(udev); |
1733 | udev->auto_pm = 0; | ||
1734 | status = usb_resume_both(udev, msg); | 1730 | status = usb_resume_both(udev, msg); |
1735 | udev->last_busy = jiffies; | 1731 | udev->last_busy = jiffies; |
1736 | usb_pm_unlock(udev); | 1732 | usb_pm_unlock(udev); |