diff options
author | Paul Gortmaker <paul.gortmaker@windriver.com> | 2012-02-25 19:09:40 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-02-28 13:53:08 -0500 |
commit | 87364624e2dd07c387b13e2ce0fda33448ef4247 (patch) | |
tree | 6b4ad798cb959450dfb3e53cb76b6e79895488d2 /drivers/usb/core | |
parent | 656d2b3964a9d0f9864d472f8dfa2dd7dd42e6c0 (diff) |
usb: fix defined but not used warnings in hcd-pci.c
Shows up on ia64 builds (and possibly elsewhere) for configs that
don't set PM_RUNTIME or PM_SLEEP as follows:
drivers/usb/core/hcd-pci.c:383:12: warning: 'suspend_common' defined but not used
drivers/usb/core/hcd-pci.c:438:12: warning: 'resume_common' defined but not used
As per above, the functions are only used if RUNTIME/SLEEP are set,
so make the two functions conditional on these Kconfig values.
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/core')
-rw-r--r-- | drivers/usb/core/hcd-pci.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/usb/core/hcd-pci.c b/drivers/usb/core/hcd-pci.c index 81e2c0d9c17d..622b4a48e732 100644 --- a/drivers/usb/core/hcd-pci.c +++ b/drivers/usb/core/hcd-pci.c | |||
@@ -380,6 +380,7 @@ static int check_root_hub_suspended(struct device *dev) | |||
380 | return 0; | 380 | return 0; |
381 | } | 381 | } |
382 | 382 | ||
383 | #if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME) | ||
383 | static int suspend_common(struct device *dev, bool do_wakeup) | 384 | static int suspend_common(struct device *dev, bool do_wakeup) |
384 | { | 385 | { |
385 | struct pci_dev *pci_dev = to_pci_dev(dev); | 386 | struct pci_dev *pci_dev = to_pci_dev(dev); |
@@ -471,6 +472,7 @@ static int resume_common(struct device *dev, int event) | |||
471 | } | 472 | } |
472 | return retval; | 473 | return retval; |
473 | } | 474 | } |
475 | #endif /* SLEEP || RUNTIME */ | ||
474 | 476 | ||
475 | #ifdef CONFIG_PM_SLEEP | 477 | #ifdef CONFIG_PM_SLEEP |
476 | 478 | ||