From david-b@pacbell.net Tue Sep 13 20:03:05 2005 From: David Brownell Subject: [patch 2.6.14-rc1, 5/5] remove some USB_SUSPEND dependencies Date: Tue, 13 Sep 2005 19:59:11 -0700 Cc: Greg KH Message-Id: <200509131959.11631.david-b@pacbell.net> 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 Signed-off-by: Greg Kroah-Hartman --- 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(-) --- gregkh-2.6.orig/drivers/usb/core/hcd.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/core/hcd.c 2005-09-16 17:34:36.000000000 -0700 @@ -1430,6 +1430,8 @@ rescan: /*-------------------------------------------------------------------------*/ +/* FIXME make this #ifdef CONFIG_PM ... update root hubs, retest */ + #ifdef CONFIG_USB_SUSPEND static int hcd_hub_suspend (struct usb_bus *bus) --- gregkh-2.6.orig/drivers/usb/host/ohci-s3c2410.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-s3c2410.c 2005-09-16 17:34:36.000000000 -0700 @@ -449,8 +449,7 @@ static const struct hc_driver ohci_s3c24 */ .hub_status_data = ohci_s3c2410_hub_status_data, .hub_control = ohci_s3c2410_hub_control, - -#if defined(CONFIG_USB_SUSPEND) && 0 +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif --- gregkh-2.6.orig/drivers/usb/host/ohci-hcd.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-hcd.c 2005-09-16 17:34:36.000000000 -0700 @@ -791,7 +791,7 @@ static void ohci_stop (struct usb_hcd *h /* must not be called from interrupt context */ -#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) +#ifdef CONFIG_PM static int ohci_restart (struct ohci_hcd *ohci) { --- gregkh-2.6.orig/drivers/usb/host/ohci-pci.c 2005-09-16 17:34:35.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-pci.c 2005-09-16 17:34:36.000000000 -0700 @@ -218,7 +218,7 @@ static const struct hc_driver ohci_pci_h */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, -#ifdef CONFIG_USB_SUSPEND +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif --- gregkh-2.6.orig/drivers/usb/host/ohci-ppc-soc.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-ppc-soc.c 2005-09-16 17:34:36.000000000 -0700 @@ -163,7 +163,7 @@ static const struct hc_driver ohci_ppc_s */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, -#ifdef CONFIG_USB_SUSPEND +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif @@ -196,7 +196,7 @@ static struct device_driver ohci_hcd_ppc .bus = &platform_bus_type, .probe = ohci_hcd_ppc_soc_drv_probe, .remove = ohci_hcd_ppc_soc_drv_remove, -#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) +#ifdef CONFIG_PM /*.suspend = ohci_hcd_ppc_soc_drv_suspend,*/ /*.resume = ohci_hcd_ppc_soc_drv_resume,*/ #endif --- gregkh-2.6.orig/drivers/usb/host/ohci-hub.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-hub.c 2005-09-16 17:34:36.000000000 -0700 @@ -36,7 +36,7 @@ /*-------------------------------------------------------------------------*/ -#if defined(CONFIG_USB_SUSPEND) || defined(CONFIG_PM) +#ifdef CONFIG_PM #define OHCI_SCHED_ENABLES \ (OHCI_CTRL_CLE|OHCI_CTRL_BLE|OHCI_CTRL_PLE|OHCI_CTRL_IE) @@ -294,7 +294,7 @@ static void ohci_rh_resume (void *_hcd) ohci_dbg(ohci, "rh_resume ??\n"); } -#endif /* CONFIG_USB_SUSPEND || CONFIG_PM */ +#endif /* CONFIG_PM */ /*-------------------------------------------------------------------------*/ --- gregkh-2.6.orig/drivers/usb/host/ohci-omap.c 2005-08-28 16:41:01.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-omap.c 2005-09-16 17:34:36.000000000 -0700 @@ -421,7 +421,7 @@ static const struct hc_driver ohci_omap_ */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, -#ifdef CONFIG_USB_SUSPEND +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif --- gregkh-2.6.orig/drivers/usb/host/ohci-sa1111.c 2005-08-28 16:41:01.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-sa1111.c 2005-09-16 17:34:36.000000000 -0700 @@ -235,7 +235,7 @@ static const struct hc_driver ohci_sa111 */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, -#ifdef CONFIG_USB_SUSPEND +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif --- gregkh-2.6.orig/drivers/usb/host/ohci-pxa27x.c 2005-09-12 23:05:05.000000000 -0700 +++ gregkh-2.6/drivers/usb/host/ohci-pxa27x.c 2005-09-16 17:34:36.000000000 -0700 @@ -278,7 +278,7 @@ static const struct hc_driver ohci_pxa27 */ .hub_status_data = ohci_hub_status_data, .hub_control = ohci_hub_control, -#ifdef CONFIG_USB_SUSPEND +#ifdef CONFIG_PM .hub_suspend = ohci_hub_suspend, .hub_resume = ohci_hub_resume, #endif