Skip to content

Commit

Permalink
usb: fix defined but not used warnings in hcd-pci.c
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Gortmaker authored and Greg Kroah-Hartman committed Feb 28, 2012
1 parent 656d2b3 commit 8736462
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/usb/core/hcd-pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -380,6 +380,7 @@ static int check_root_hub_suspended(struct device *dev)
return 0;
}

#if defined(CONFIG_PM_SLEEP) || defined(CONFIG_PM_RUNTIME)
static int suspend_common(struct device *dev, bool do_wakeup)
{
struct pci_dev *pci_dev = to_pci_dev(dev);
Expand Down Expand Up @@ -471,6 +472,7 @@ static int resume_common(struct device *dev, int event)
}
return retval;
}
#endif /* SLEEP || RUNTIME */

#ifdef CONFIG_PM_SLEEP

Expand Down

0 comments on commit 8736462

Please sign in to comment.