[PATCH] remove some USB_SUSPEND dependencies
authorDavid Brownell <david-b@pacbell.net>
Wed, 14 Sep 2005 02:59:11 +0000 (19:59 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 28 Oct 2005 23:47:39 +0000 (16:47 -0700)
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(-)

drivers/usb/core/hcd.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-hub.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci-pci.c
drivers/usb/host/ohci-ppc-soc.c
drivers/usb/host/ohci-pxa27x.c
drivers/usb/host/ohci-s3c2410.c
drivers/usb/host/ohci-sa1111.c

index 14c47a10da86d0a01bcac3c2e4f9061fff5d439b..5e8ade07d7f9d59bf43224b8835aaa191348642a 100644 (file)
@@ -1431,6 +1431,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)
index f8da8c7af7c66b69ff8746b943f0266b1bc3b8ce..c26ab5f2a40304542a3036f6910de162940f644a 100644 (file)
@@ -791,7 +791,7 @@ static void ohci_stop (struct usb_hcd *hcd)
 
 /* 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)
 {
index ce7b28da7a1540c0e00c7f8e95b030d5191fd89e..b96948ea300554d377b656246d7058bc4885011b 100644 (file)
@@ -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 */
 
 /*-------------------------------------------------------------------------*/
 
index a574216625a03c7d84f443aa31f9ab4fec9a6f85..e67c07dc426d508dceeaaaa7906c3f89b74f1a2c 100644 (file)
@@ -420,7 +420,7 @@ static const struct hc_driver ohci_omap_hc_driver = {
         */
        .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
index 41e85980fa7a585545f2eb6fd157a6150f599f3e..0afa237b02adf7c3f9655bb73b0261f17002caa2 100644 (file)
@@ -218,7 +218,7 @@ static const struct hc_driver ohci_pci_hc_driver = {
         */
        .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
index 2515333630283fee0aeb83ccb84cadfbc84422a4..ec20710e99fe01e08d75eb172c492a4a349bfe3b 100644 (file)
@@ -163,7 +163,7 @@ static const struct hc_driver ohci_ppc_soc_hc_driver = {
         */
        .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_soc_driver = {
        .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
index f042261ecb8e95e881de526b9a32ae6b89331b89..986c4f656e224c3f21fca77e36dc1039cb5b9019 100644 (file)
@@ -278,7 +278,7 @@ static const struct hc_driver ohci_pxa27x_hc_driver = {
         */
        .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
index da7d5478f74d716a43fce47553a602d747b0afce..8cf12b2be2a35c4c3c40c01e9fb152c9fc908040 100644 (file)
@@ -448,8 +448,7 @@ static const struct hc_driver ohci_s3c2410_hc_driver = {
         */
        .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
index 814d2be4ee7b93e06b94203ac313473a02b41d41..7dd1f410b7f104a9e3b13dc8e3bb834c9421adac 100644 (file)
@@ -235,7 +235,7 @@ static const struct hc_driver ohci_sa1111_hc_driver = {
         */
        .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