diff options
author | Pavel Machek <pavel@suse.cz> | 2005-04-18 20:39:24 -0400 |
---|---|---|
committer | Greg K-H <gregkh@suse.de> | 2005-04-18 20:39:24 -0400 |
commit | ba9d35fb01852e195f2a4ca975fdcd6578b52c78 (patch) | |
tree | e0609e6e255f4875ba5ab69bb0aa169d8c5edae8 /drivers | |
parent | 9a5d3e98dd31abcecbf4533b81866d440cc0f106 (diff) |
[PATCH] USB: fix up remaining pm_message_t usages
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/core/hub.c | 4 | ||||
-rw-r--r-- | drivers/usb/gadget/omap_udc.c | 12 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 4 |
4 files changed, 12 insertions, 12 deletions
diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c index 94f7d2d1faf6..15ac4d168862 100644 --- a/drivers/usb/core/hub.c +++ b/drivers/usb/core/hub.c | |||
@@ -1456,7 +1456,7 @@ static void hub_port_logical_disconnect(struct usb_hub *hub, int port1) | |||
1456 | /* FIXME let caller ask to power down the port: | 1456 | /* FIXME let caller ask to power down the port: |
1457 | * - some devices won't enumerate without a VBUS power cycle | 1457 | * - some devices won't enumerate without a VBUS power cycle |
1458 | * - SRP saves power that way | 1458 | * - SRP saves power that way |
1459 | * - usb_suspend_device(dev,PM_SUSPEND_DISK) | 1459 | * - usb_suspend_device(dev, PMSG_SUSPEND) |
1460 | * That's easy if this hub can switch power per-port, and | 1460 | * That's easy if this hub can switch power per-port, and |
1461 | * khubd reactivates the port later (timer, SRP, etc). | 1461 | * khubd reactivates the port later (timer, SRP, etc). |
1462 | * Powerdown must be optional, because of reset/DFU. | 1462 | * Powerdown must be optional, because of reset/DFU. |
@@ -1531,7 +1531,7 @@ static int hub_port_suspend(struct usb_hub *hub, int port1, | |||
1531 | 1531 | ||
1532 | /* | 1532 | /* |
1533 | * Devices on USB hub ports have only one "suspend" state, corresponding | 1533 | * Devices on USB hub ports have only one "suspend" state, corresponding |
1534 | * to ACPI D2 (PM_SUSPEND_MEM), "may cause the device to lose some context". | 1534 | * to ACPI D2, "may cause the device to lose some context". |
1535 | * State transitions include: | 1535 | * State transitions include: |
1536 | * | 1536 | * |
1537 | * - suspend, resume ... when the VBUS power link stays live | 1537 | * - suspend, resume ... when the VBUS power link stays live |
diff --git a/drivers/usb/gadget/omap_udc.c b/drivers/usb/gadget/omap_udc.c index b66ea5a6ed79..98cbcbc16cc1 100644 --- a/drivers/usb/gadget/omap_udc.c +++ b/drivers/usb/gadget/omap_udc.c | |||
@@ -2809,17 +2809,15 @@ static int __exit omap_udc_remove(struct device *dev) | |||
2809 | return 0; | 2809 | return 0; |
2810 | } | 2810 | } |
2811 | 2811 | ||
2812 | /* suspend/resume/wakeup from sysfs (echo > power/state) */ | 2812 | static int omap_udc_suspend(struct device *dev, pm_message_t state, u32 level) |
2813 | |||
2814 | static int omap_udc_suspend(struct device *dev, u32 state, u32 level) | ||
2815 | { | 2813 | { |
2816 | if (level != 0) | 2814 | if (level != 0) |
2817 | return 0; | 2815 | return 0; |
2818 | 2816 | ||
2819 | DBG("suspend, state %d\n", state); | 2817 | DBG("suspend, state %d\n", state); |
2820 | omap_pullup(&udc->gadget, 0); | 2818 | omap_pullup(&udc->gadget, 0); |
2821 | udc->gadget.dev.power.power_state = 3; | 2819 | udc->gadget.dev.power.power_state = PMSG_SUSPEND; |
2822 | udc->gadget.dev.parent->power.power_state = 3; | 2820 | udc->gadget.dev.parent->power.power_state = PMSG_SUSPEND; |
2823 | return 0; | 2821 | return 0; |
2824 | } | 2822 | } |
2825 | 2823 | ||
@@ -2829,8 +2827,8 @@ static int omap_udc_resume(struct device *dev, u32 level) | |||
2829 | return 0; | 2827 | return 0; |
2830 | 2828 | ||
2831 | DBG("resume + wakeup/SRP\n"); | 2829 | DBG("resume + wakeup/SRP\n"); |
2832 | udc->gadget.dev.parent->power.power_state = 0; | 2830 | udc->gadget.dev.parent->power.power_state = PMSG_ON; |
2833 | udc->gadget.dev.power.power_state = 0; | 2831 | udc->gadget.dev.power.power_state = PMSG_ON; |
2834 | omap_pullup(&udc->gadget, 1); | 2832 | omap_pullup(&udc->gadget, 1); |
2835 | 2833 | ||
2836 | /* maybe the host would enumerate us if we nudged it */ | 2834 | /* maybe the host would enumerate us if we nudged it */ |
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index 90285f180f87..8aab5907afe9 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -458,9 +458,11 @@ static int ohci_hcd_omap_drv_remove(struct device *dev) | |||
458 | 458 | ||
459 | /* states match PCI usage, always suspending the root hub except that | 459 | /* states match PCI usage, always suspending the root hub except that |
460 | * 4 ~= D3cold (ACPI D3) with clock off (resume sees reset). | 460 | * 4 ~= D3cold (ACPI D3) with clock off (resume sees reset). |
461 | * | ||
462 | * FIXME: above comment is not right, and code is wrong, too :-(. | ||
461 | */ | 463 | */ |
462 | 464 | ||
463 | static int ohci_omap_suspend(struct device *dev, u32 state, u32 level) | 465 | static int ohci_omap_suspend(struct device *dev, pm_message_t state, u32 level) |
464 | { | 466 | { |
465 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); | 467 | struct ohci_hcd *ohci = hcd_to_ohci(dev_get_drvdata(dev)); |
466 | int status = -EINVAL; | 468 | int status = -EINVAL; |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index 6f3464a95779..e5bc1789d18a 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -337,7 +337,7 @@ static int ohci_hcd_pxa27x_drv_remove(struct device *dev) | |||
337 | return 0; | 337 | return 0; |
338 | } | 338 | } |
339 | 339 | ||
340 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level) | 340 | static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, pm_message_t state, u32 level) |
341 | { | 341 | { |
342 | // struct platform_device *pdev = to_platform_device(dev); | 342 | // struct platform_device *pdev = to_platform_device(dev); |
343 | // struct usb_hcd *hcd = dev_get_drvdata(dev); | 343 | // struct usb_hcd *hcd = dev_get_drvdata(dev); |
@@ -346,7 +346,7 @@ static int ohci_hcd_pxa27x_drv_suspend(struct device *dev, u32 state, u32 level) | |||
346 | return 0; | 346 | return 0; |
347 | } | 347 | } |
348 | 348 | ||
349 | static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 state) | 349 | static int ohci_hcd_pxa27x_drv_resume(struct device *dev, u32 level) |
350 | { | 350 | { |
351 | // struct platform_device *pdev = to_platform_device(dev); | 351 | // struct platform_device *pdev = to_platform_device(dev); |
352 | // struct usb_hcd *hcd = dev_get_drvdata(dev); | 352 | // struct usb_hcd *hcd = dev_get_drvdata(dev); |