Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8ad7fe16 authored by David Brownell's avatar David Brownell Committed by Greg Kroah-Hartman
Browse files

[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: default avatarDavid Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: default avatarGreg 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(-)
parent dbc3887e
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -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)
+1 −1
Original line number Diff line number Diff line
@@ -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)
{
+2 −2
Original line number Diff line number Diff line
@@ -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 */

/*-------------------------------------------------------------------------*/

+1 −1
Original line number Diff line number Diff line
@@ -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
+1 −1
Original line number Diff line number Diff line
@@ -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
Loading