tree e0609e6e255f4875ba5ab69bb0aa169d8c5edae8
parent 9a5d3e98dd31abcecbf4533b81866d440cc0f106
author Pavel Machek <[EMAIL PROTECTED]> Tue, 19 Apr 2005 07:39:24 -0700
committer Greg K-H <[EMAIL PROTECTED]> Tue, 19 Apr 2005 07:39:24 -0700
[PATCH] USB: fix up remaining pm_message_t usages
Signed-off-by: Greg Kroah-Hartman <[EMAIL PROTECTED]>
usb/core/hub.c | 4 ++--
usb/gadget/omap_udc.c | 12 +++++-------
usb/host/ohci-omap.c | 4 +++-
usb/host/ohci-pxa27x.c | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
Index: drivers/usb/core/hub.c
===================================================================
--- 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/core/hub.c
(mode:100644 sha1:94f7d2d1faf69276f1c3a724a037f587b917cd85)
+++ e0609e6e255f4875ba5ab69bb0aa169d8c5edae8/drivers/usb/core/hub.c
(mode:100644 sha1:15ac4d16886274579d091994cf1be5e949af26c5)
@@ -1456,7 +1456,7 @@
/* FIXME let caller ask to power down the port:
* - some devices won't enumerate without a VBUS power cycle
* - SRP saves power that way
- * - usb_suspend_device(dev,PM_SUSPEND_DISK)
+ * - usb_suspend_device(dev, PMSG_SUSPEND)
* That's easy if this hub can switch power per-port, and
* khubd reactivates the port later (timer, SRP, etc).
* Powerdown must be optional, because of reset/DFU.
@@ -1531,7 +1531,7 @@
/*
* Devices on USB hub ports have only one "suspend" state, corresponding
- * to ACPI D2 (PM_SUSPEND_MEM), "may cause the device to lose some context".
+ * to ACPI D2, "may cause the device to lose some context".
* State transitions include:
*
* - suspend, resume ... when the VBUS power link stays live
Index: drivers/usb/gadget/omap_udc.c
===================================================================
--- 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/gadget/omap_udc.c
(mode:100644 sha1:b66ea5a6ed791d6f0e8d2a05de7977da0aabe661)
+++ e0609e6e255f4875ba5ab69bb0aa169d8c5edae8/drivers/usb/gadget/omap_udc.c
(mode:100644 sha1:98cbcbc16cc19da3429aca42ef966612bf667723)
@@ -2809,17 +2809,15 @@
return 0;
}
-/* suspend/resume/wakeup from sysfs (echo > power/state) */
-
-static int omap_udc_suspend(struct device *dev, u32 state, u32 level)
+static int omap_udc_suspend(struct device *dev, pm_message_t state, u32 level)
{
if (level != 0)
return 0;
DBG("suspend, state %d\n", state);
omap_pullup(&udc->gadget, 0);
- udc->gadget.dev.power.power_state = 3;
- udc->gadget.dev.parent->power.power_state = 3;
+ udc->gadget.dev.power.power_state = PMSG_SUSPEND;
+ udc->gadget.dev.parent->power.power_state = PMSG_SUSPEND;
return 0;
}
@@ -2829,8 +2827,8 @@
return 0;
DBG("resume + wakeup/SRP\n");
- udc->gadget.dev.parent->power.power_state = 0;
- udc->gadget.dev.power.power_state = 0;
+ udc->gadget.dev.parent->power.power_state = PMSG_ON;
+ udc->gadget.dev.power.power_state = PMSG_ON;
omap_pullup(&udc->gadget, 1);
/* maybe the host would enumerate us if we nudged it */
Index: drivers/usb/host/ohci-omap.c
===================================================================
--- 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ohci-omap.c
(mode:100644 sha1:90285f180f87a1775280ffb2176adc81e343d7ae)
+++ e0609e6e255f4875ba5ab69bb0aa169d8c5edae8/drivers/usb/host/ohci-omap.c
(mode:100644 sha1:8aab5907afe9ad442012ec4c00aecd46dd88c50b)
@@ -458,9 +458,11 @@
/* states match PCI usage, always suspending the root hub except that
* 4 ~= D3cold (ACPI D3) with clock off (resume sees reset).
+ *
+ * FIXME: above comment is not right, and code is wrong, too :-(.
*/
-static int ohci_omap_suspend(struct device *dev, u32 state, u32 level)
+static int ohci_omap_suspend(struct device *dev, pm_message_t state, u32 level)
{
struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev));
int status = -EINVAL;
Index: drivers/usb/host/ohci-pxa27x.c
===================================================================
--- 8638550bd50ff0fdc3b097d0643b5efed3516633/drivers/usb/host/ohci-pxa27x.c
(mode:100644 sha1:6f3464a957798e5390d27988c4a4c2b569d414e4)
+++ e0609e6e255f4875ba5ab69bb0aa169d8c5edae8/drivers/usb/host/ohci-pxa27x.c
(mode:100644 sha1:e5bc1789d18a6532b13cdaf1e367e8002c9d9b49)
@@ -337,7 +337,7 @@
return 0;
}
-static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32
level)
+static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state,
u32 level)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
@@ -346,7 +346,7 @@
return 0;
}
-static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 state)
+static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 level)
{
// struct platform_device *pdev = to_platform_device(dev);
// struct usb_hcd *hcd = dev_get_drvdata(dev);
-
To unsubscribe from this list: send the line "unsubscribe bk-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at http://vger.kernel.org/majordomo-info.html