Merge branch 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6
* 'pm-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/suspend-2.6: USB: Move runtime PM callbacks to usb_device_pm_ops
This commit is contained in:
commit
26b95cac5f
@ -1646,7 +1646,7 @@ static int autosuspend_check(struct usb_device *udev)
|
|||||||
return 0;
|
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);
|
struct usb_device *udev = to_usb_device(dev);
|
||||||
int status;
|
int status;
|
||||||
@ -1667,7 +1667,7 @@ static int usb_runtime_suspend(struct device *dev)
|
|||||||
return status;
|
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);
|
struct usb_device *udev = to_usb_device(dev);
|
||||||
int status;
|
int status;
|
||||||
@ -1679,7 +1679,7 @@ static int usb_runtime_resume(struct device *dev)
|
|||||||
return status;
|
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);
|
struct usb_device *udev = to_usb_device(dev);
|
||||||
|
|
||||||
@ -1691,19 +1691,10 @@ static int usb_runtime_idle(struct device *dev)
|
|||||||
return 0;
|
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 */
|
#endif /* CONFIG_USB_SUSPEND */
|
||||||
|
|
||||||
struct bus_type usb_bus_type = {
|
struct bus_type usb_bus_type = {
|
||||||
.name = "usb",
|
.name = "usb",
|
||||||
.match = usb_device_match,
|
.match = usb_device_match,
|
||||||
.uevent = usb_uevent,
|
.uevent = usb_uevent,
|
||||||
#ifdef CONFIG_USB_SUSPEND
|
|
||||||
.pm = &usb_bus_pm_ops,
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
@ -315,6 +315,11 @@ static const struct dev_pm_ops usb_device_pm_ops = {
|
|||||||
.thaw = usb_dev_thaw,
|
.thaw = usb_dev_thaw,
|
||||||
.poweroff = usb_dev_poweroff,
|
.poweroff = usb_dev_poweroff,
|
||||||
.restore = usb_dev_restore,
|
.restore = usb_dev_restore,
|
||||||
|
#ifdef CONFIG_USB_SUSPEND
|
||||||
|
.runtime_suspend = usb_runtime_suspend,
|
||||||
|
.runtime_resume = usb_runtime_resume,
|
||||||
|
.runtime_idle = usb_runtime_idle,
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* CONFIG_PM */
|
#endif /* CONFIG_PM */
|
||||||
|
@ -77,6 +77,9 @@ static inline int usb_port_resume(struct usb_device *udev, pm_message_t msg)
|
|||||||
extern void usb_autosuspend_device(struct usb_device *udev);
|
extern void usb_autosuspend_device(struct usb_device *udev);
|
||||||
extern int usb_autoresume_device(struct usb_device *udev);
|
extern int usb_autoresume_device(struct usb_device *udev);
|
||||||
extern int usb_remote_wakeup(struct usb_device *dev);
|
extern int usb_remote_wakeup(struct usb_device *dev);
|
||||||
|
extern int usb_runtime_suspend(struct device *dev);
|
||||||
|
extern int usb_runtime_resume(struct device *dev);
|
||||||
|
extern int usb_runtime_idle(struct device *dev);
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user