diff options
author | Rafael J. Wysocki <rjw@sisk.pl> | 2011-03-18 19:55:36 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rjw@sisk.pl> | 2011-03-18 19:55:36 +0100 |
commit | e1620d591a75a10b15cf61dbf8243a0b7e6731a2 (patch) | |
tree | 01facc1611d08d80fc1f0a3d430e83779e9fbdc5 /drivers/usb/core/driver.c | |
parent | 99759619b27662d1290901228d77a293e6e83200 (diff) | |
download | blackbird-op-linux-e1620d591a75a10b15cf61dbf8243a0b7e6731a2.tar.gz blackbird-op-linux-e1620d591a75a10b15cf61dbf8243a0b7e6731a2.zip |
USB: Move runtime PM callbacks to usb_device_pm_ops
USB defines usb_device_type pointing to usb_device_pm_ops that
provides system-wide PM callbacks only and usb_bus_type pointing to
usb_bus_pm_ops that provides runtime PM callbacks only. However,
the USB runtime PM callbacks may be defined in usb_device_pm_ops
which makes it possible to drop usb_bus_pm_ops and will allow us
to consolidate the handling of subsystems by the PM core code.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/core/driver.c')
-rw-r--r-- | drivers/usb/core/driver.c | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/drivers/usb/core/driver.c b/drivers/usb/core/driver.c index 38072e4e74bd..e35a17687c05 100644 --- a/drivers/usb/core/driver.c +++ b/drivers/usb/core/driver.c @@ -1646,7 +1646,7 @@ static int autosuspend_check(struct usb_device *udev) return 0; } -static int usb_runtime_suspend(struct device *dev) +int usb_runtime_suspend(struct device *dev) { struct usb_device *udev = to_usb_device(dev); int status; @@ -1667,7 +1667,7 @@ static int usb_runtime_suspend(struct device *dev) return status; } -static int usb_runtime_resume(struct device *dev) +int usb_runtime_resume(struct device *dev) { struct usb_device *udev = to_usb_device(dev); int status; @@ -1679,7 +1679,7 @@ static int usb_runtime_resume(struct device *dev) return status; } -static int usb_runtime_idle(struct device *dev) +int usb_runtime_idle(struct device *dev) { struct usb_device *udev = to_usb_device(dev); @@ -1691,19 +1691,10 @@ static int usb_runtime_idle(struct device *dev) return 0; } -static const struct dev_pm_ops usb_bus_pm_ops = { - .runtime_suspend = usb_runtime_suspend, - .runtime_resume = usb_runtime_resume, - .runtime_idle = usb_runtime_idle, -}; - #endif /* CONFIG_USB_SUSPEND */ struct bus_type usb_bus_type = { .name = "usb", .match = usb_device_match, .uevent = usb_uevent, -#ifdef CONFIG_USB_SUSPEND - .pm = &usb_bus_pm_ops, -#endif }; |