diff options
author | Russell King <rmk@arm.linux.org.uk> | 2005-10-28 12:52:56 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 12:52:56 -0400 |
commit | 9480e307cd88ef09ec9294c7d97ebec18e6d2221 (patch) | |
tree | 967e26d3a23c24dd52b114d672312c207714308c /drivers/usb/gadget/pxa2xx_udc.c | |
parent | a3a3395e487abc4c1371fe319a8ecbb3913a70a4 (diff) |
[PATCH] DRIVER MODEL: Get rid of the obsolete tri-level suspend/resume callbacks
In PM v1, all devices were called at SUSPEND_DISABLE level. Then
all devices were called at SUSPEND_SAVE_STATE level, and finally
SUSPEND_POWER_DOWN level. However, with PM v2, to maintain
compatibility for platform devices, I arranged for the PM v2
suspend/resume callbacks to call the old PM v1 suspend/resume
callbacks three times with each level in order so that existing
drivers continued to work.
Since this is obsolete infrastructure which is no longer necessary,
we can remove it. Here's an (untested) patch to do exactly that.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/pxa2xx_udc.c')
-rw-r--r-- | drivers/usb/gadget/pxa2xx_udc.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/usb/gadget/pxa2xx_udc.c b/drivers/usb/gadget/pxa2xx_udc.c index 73f8c9404156..00dfe42d7a86 100644 --- a/drivers/usb/gadget/pxa2xx_udc.c +++ b/drivers/usb/gadget/pxa2xx_udc.c | |||
@@ -2602,24 +2602,23 @@ static int __exit pxa2xx_udc_remove(struct device *_dev) | |||
2602 | * VBUS IRQs should probably be ignored so that the PXA device just acts | 2602 | * VBUS IRQs should probably be ignored so that the PXA device just acts |
2603 | * "dead" to USB hosts until system resume. | 2603 | * "dead" to USB hosts until system resume. |
2604 | */ | 2604 | */ |
2605 | static int pxa2xx_udc_suspend(struct device *dev, pm_message_t state, u32 level) | 2605 | static int pxa2xx_udc_suspend(struct device *dev, pm_message_t state) |
2606 | { | 2606 | { |
2607 | struct pxa2xx_udc *udc = dev_get_drvdata(dev); | 2607 | struct pxa2xx_udc *udc = dev_get_drvdata(dev); |
2608 | 2608 | ||
2609 | if (level == SUSPEND_POWER_DOWN) { | 2609 | if (!udc->mach->udc_command) |
2610 | if (!udc->mach->udc_command) | 2610 | WARN("USB host won't detect disconnect!\n"); |
2611 | WARN("USB host won't detect disconnect!\n"); | 2611 | pullup(udc, 0); |
2612 | pullup(udc, 0); | 2612 | |
2613 | } | ||
2614 | return 0; | 2613 | return 0; |
2615 | } | 2614 | } |
2616 | 2615 | ||
2617 | static int pxa2xx_udc_resume(struct device *dev, u32 level) | 2616 | static int pxa2xx_udc_resume(struct device *dev) |
2618 | { | 2617 | { |
2619 | struct pxa2xx_udc *udc = dev_get_drvdata(dev); | 2618 | struct pxa2xx_udc *udc = dev_get_drvdata(dev); |
2620 | 2619 | ||
2621 | if (level == RESUME_POWER_ON) | 2620 | pullup(udc, 1); |
2622 | pullup(udc, 1); | 2621 | |
2623 | return 0; | 2622 | return 0; |
2624 | } | 2623 | } |
2625 | 2624 | ||