diff options
author | David Brownell <david-b@pacbell.net> | 2005-09-13 22:59:11 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2005-10-28 19:47:39 -0400 |
commit | 8ad7fe16df5e07320626be83fbba6d1c6bda5ec0 (patch) | |
tree | 7bd854843d6d61756a16421368aa6cb1428b23c8 | |
parent | dbc3887e7df4be78b33a83b97fde5d5f9a389859 (diff) |
[PATCH] remove some USB_SUSPEND dependencies
This simplifies some of the PM-related #ifdeffing by recognizing
that USB_SUSPEND depends on PM. Also, OHCI drivers were often
testing for USB_SUSPEND when they should have tested just PM.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/core/hcd.c | 2 ++
drivers/usb/host/ohci-hcd.c | 2 +-
drivers/usb/host/ohci-hub.c | 4 ++--
drivers/usb/host/ohci-omap.c | 2 +-
drivers/usb/host/ohci-pci.c | 2 +-
drivers/usb/host/ohci-ppc-soc.c | 4 ++--
drivers/usb/host/ohci-pxa27x.c | 2 +-
drivers/usb/host/ohci-s3c2410.c | 3 +--
drivers/usb/host/ohci-sa1111.c | 2 +-
9 files changed, 12 insertions(+), 11 deletions(-)
-rw-r--r-- | drivers/usb/core/hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hcd.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-hub.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-omap.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pci.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-ppc-soc.c | 4 | ||||
-rw-r--r-- | drivers/usb/host/ohci-pxa27x.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/ohci-s3c2410.c | 3 | ||||
-rw-r--r-- | drivers/usb/host/ohci-sa1111.c | 2 |
9 files changed, 12 insertions, 11 deletions
diff --git a/drivers/usb/core/hcd.c b/drivers/usb/core/hcd.c index 14c47a10da86..5e8ade07d7f9 100644 --- a/drivers/usb/core/hcd.c +++ b/drivers/usb/core/hcd.c | |||
@@ -1431,6 +1431,8 @@ rescan: | |||
1431 | 1431 | ||
1432 | /*-------------------------------------------------------------------------*/ | 1432 | /*-------------------------------------------------------------------------*/ |
1433 | 1433 | ||
1434 | /* FIXME make this #ifdef CONFIG_PM ... update root hubs, retest */ | ||
1435 | |||
1434 | #ifdef CONFIG_USB_SUSPEND | 1436 | #ifdef CONFIG_USB_SUSPEND |
1435 | 1437 | ||
1436 | static int hcd_hub_suspend (struct usb_bus *bus) | 1438 | static int hcd_hub_suspend (struct usb_bus *bus) |
diff --git a/drivers/usb/host/ohci-hcd.c b/drivers/usb/host/ohci-hcd.c index f8da8c7af7c6..c26ab5f2a403 100644 --- a/drivers/usb/host/ohci-hcd.c +++ b/drivers/usb/host/ohci-hcd.c | |||
@@ -791,7 +791,7 @@ static void ohci_stop (struct usb_hcd *hcd) | |||
791 | 791 | ||
792 | /* must not be called from interrupt context */ | 792 | /* must not be called from interrupt context */ |
793 | 793 | ||
794 | #if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) | 794 | #ifdef CONFIG_PM |
795 | 795 | ||
796 | static int ohci_restart (struct ohci_hcd *ohci) | 796 | static int ohci_restart (struct ohci_hcd *ohci) |
797 | { | 797 | { |
diff --git a/drivers/usb/host/ohci-hub.c b/drivers/usb/host/ohci-hub.c index ce7b28da7a15..b96948ea3005 100644 --- a/drivers/usb/host/ohci-hub.c +++ b/drivers/usb/host/ohci-hub.c | |||
@@ -36,7 +36,7 @@ | |||
36 | 36 | ||
37 | /*-------------------------------------------------------------------------*/ | 37 | /*-------------------------------------------------------------------------*/ |
38 | 38 | ||
39 | #if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) | 39 | #ifdef CONFIG_PM |
40 | 40 | ||
41 | #define OHCI_SCHED_ENABLES \ | 41 | #define OHCI_SCHED_ENABLES \ |
42 | (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) | 42 | (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) |
@@ -294,7 +294,7 @@ static void ohci_rh_resume (void *_hcd) | |||
294 | ohci_dbg(ohci, "rh_resume ??\n"); | 294 | ohci_dbg(ohci, "rh_resume ??\n"); |
295 | } | 295 | } |
296 | 296 | ||
297 | #endif /* CONFIG_USB_SUSPEND || CONFIG_PM */ | 297 | #endif /* CONFIG_PM */ |
298 | 298 | ||
299 | /*-------------------------------------------------------------------------*/ | 299 | /*-------------------------------------------------------------------------*/ |
300 | 300 | ||
diff --git a/drivers/usb/host/ohci-omap.c b/drivers/usb/host/ohci-omap.c index a574216625a0..e67c07dc426d 100644 --- a/drivers/usb/host/ohci-omap.c +++ b/drivers/usb/host/ohci-omap.c | |||
@@ -420,7 +420,7 @@ static const struct hc_driver ohci_omap_hc_driver = { | |||
420 | */ | 420 | */ |
421 | .hub_status_data = ohci_hub_status_data, | 421 | .hub_status_data = ohci_hub_status_data, |
422 | .hub_control = ohci_hub_control, | 422 | .hub_control = ohci_hub_control, |
423 | #ifdef CONFIG_USB_SUSPEND | 423 | #ifdef CONFIG_PM |
424 | .hub_suspend = ohci_hub_suspend, | 424 | .hub_suspend = ohci_hub_suspend, |
425 | .hub_resume = ohci_hub_resume, | 425 | .hub_resume = ohci_hub_resume, |
426 | #endif | 426 | #endif |
diff --git a/drivers/usb/host/ohci-pci.c b/drivers/usb/host/ohci-pci.c index 41e85980fa7a..0afa237b02ad 100644 --- a/drivers/usb/host/ohci-pci.c +++ b/drivers/usb/host/ohci-pci.c | |||
@@ -218,7 +218,7 @@ static const struct hc_driver ohci_pci_hc_driver = { | |||
218 | */ | 218 | */ |
219 | .hub_status_data = ohci_hub_status_data, | 219 | .hub_status_data = ohci_hub_status_data, |
220 | .hub_control = ohci_hub_control, | 220 | .hub_control = ohci_hub_control, |
221 | #ifdef CONFIG_USB_SUSPEND | 221 | #ifdef CONFIG_PM |
222 | .hub_suspend = ohci_hub_suspend, | 222 | .hub_suspend = ohci_hub_suspend, |
223 | .hub_resume = ohci_hub_resume, | 223 | .hub_resume = ohci_hub_resume, |
224 | #endif | 224 | #endif |
diff --git a/drivers/usb/host/ohci-ppc-soc.c b/drivers/usb/host/ohci-ppc-soc.c index 251533363028..ec20710e99fe 100644 --- a/drivers/usb/host/ohci-ppc-soc.c +++ b/drivers/usb/host/ohci-ppc-soc.c | |||
@@ -163,7 +163,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = { | |||
163 | */ | 163 | */ |
164 | .hub_status_data = ohci_hub_status_data, | 164 | .hub_status_data = ohci_hub_status_data, |
165 | .hub_control = ohci_hub_control, | 165 | .hub_control = ohci_hub_control, |
166 | #ifdef CONFIG_USB_SUSPEND | 166 | #ifdef CONFIG_PM |
167 | .hub_suspend = ohci_hub_suspend, | 167 | .hub_suspend = ohci_hub_suspend, |
168 | .hub_resume = ohci_hub_resume, | 168 | .hub_resume = ohci_hub_resume, |
169 | #endif | 169 | #endif |
@@ -196,7 +196,7 @@ static struct device_driver ohci_hcd_ppc_soc_driver = { | |||
196 | .bus = &platform_bus_type, | 196 | .bus = &platform_bus_type, |
197 | .probe = ohci_hcd_ppc_soc_drv_probe, | 197 | .probe = ohci_hcd_ppc_soc_drv_probe, |
198 | .remove = ohci_hcd_ppc_soc_drv_remove, | 198 | .remove = ohci_hcd_ppc_soc_drv_remove, |
199 | #if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) | 199 | #ifdef CONFIG_PM |
200 | /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ | 200 | /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ |
201 | /*.resume = ohci_hcd_ppc_soc_drv_resume,*/ | 201 | /*.resume = ohci_hcd_ppc_soc_drv_resume,*/ |
202 | #endif | 202 | #endif |
diff --git a/drivers/usb/host/ohci-pxa27x.c b/drivers/usb/host/ohci-pxa27x.c index f042261ecb8e..986c4f656e22 100644 --- a/drivers/usb/host/ohci-pxa27x.c +++ b/drivers/usb/host/ohci-pxa27x.c | |||
@@ -278,7 +278,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = { | |||
278 | */ | 278 | */ |
279 | .hub_status_data = ohci_hub_status_data, | 279 | .hub_status_data = ohci_hub_status_data, |
280 | .hub_control = ohci_hub_control, | 280 | .hub_control = ohci_hub_control, |
281 | #ifdef CONFIG_USB_SUSPEND | 281 | #ifdef CONFIG_PM |
282 | .hub_suspend = ohci_hub_suspend, | 282 | .hub_suspend = ohci_hub_suspend, |
283 | .hub_resume = ohci_hub_resume, | 283 | .hub_resume = ohci_hub_resume, |
284 | #endif | 284 | #endif |
diff --git a/drivers/usb/host/ohci-s3c2410.c b/drivers/usb/host/ohci-s3c2410.c index da7d5478f74d..8cf12b2be2a3 100644 --- a/drivers/usb/host/ohci-s3c2410.c +++ b/drivers/usb/host/ohci-s3c2410.c | |||
@@ -448,8 +448,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = { | |||
448 | */ | 448 | */ |
449 | .hub_status_data = ohci_s3c2410_hub_status_data, | 449 | .hub_status_data = ohci_s3c2410_hub_status_data, |
450 | .hub_control = ohci_s3c2410_hub_control, | 450 | .hub_control = ohci_s3c2410_hub_control, |
451 | 451 | #ifdef CONFIG_PM | |
452 | #if defined(CONFIG_USB_SUSPEND) && 0 | ||
453 | .hub_suspend = ohci_hub_suspend, | 452 | .hub_suspend = ohci_hub_suspend, |
454 | .hub_resume = ohci_hub_resume, | 453 | .hub_resume = ohci_hub_resume, |
455 | #endif | 454 | #endif |
diff --git a/drivers/usb/host/ohci-sa1111.c b/drivers/usb/host/ohci-sa1111.c index 814d2be4ee7b..7dd1f410b7f1 100644 --- a/drivers/usb/host/ohci-sa1111.c +++ b/drivers/usb/host/ohci-sa1111.c | |||
@@ -235,7 +235,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = { | |||
235 | */ | 235 | */ |
236 | .hub_status_data = ohci_hub_status_data, | 236 | .hub_status_data = ohci_hub_status_data, |
237 | .hub_control = ohci_hub_control, | 237 | .hub_control = ohci_hub_control, |
238 | #ifdef CONFIG_USB_SUSPEND | 238 | #ifdef CONFIG_PM |
239 | .hub_suspend = ohci_hub_suspend, | 239 | .hub_suspend = ohci_hub_suspend, |
240 | .hub_resume = ohci_hub_resume, | 240 | .hub_resume = ohci_hub_resume, |
241 | #endif | 241 | #endif |