diff options
| author | Arnd Bergmann <[email protected]> | 2023-03-28 13:10:43 +0000 |
|---|---|---|
| committer | Greg Kroah-Hartman <[email protected]> | 2023-03-29 06:56:35 +0000 |
| commit | 130eac4170859fb368681e00d390f20f44bbf27b (patch) | |
| tree | 917fe3662422da7b1f176e135368ce17a6101bb1 /drivers/usb/dwc2/hcd_queue.c | |
| parent | usb: gadget: ffs: remove ENTER() macro (diff) | |
| download | kernel-130eac4170859fb368681e00d390f20f44bbf27b.tar.gz kernel-130eac4170859fb368681e00d390f20f44bbf27b.zip | |
xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
A recent patch caused an unused-function warning in builds with
CONFIG_PM disabled, after the function became marked 'static':
drivers/usb/host/xhci-pci.c:91:13: error: 'xhci_msix_sync_irqs' defined but not used [-Werror=unused-function]
91 | static void xhci_msix_sync_irqs(struct xhci_hcd *xhci)
| ^~~~~~~~~~~~~~~~~~~
This could be solved by adding another #ifdef, but as there is
a trend towards removing CONFIG_PM checks in favor of helper
macros, do the same conversion here and use pm_ptr() to get
either a function pointer or NULL but avoid the warning.
As the hidden functions reference some other symbols, make
sure those are visible at compile time, at the minimal cost of
a few extra bytes for 'struct usb_device'.
Fixes: 9abe15d55dcc ("xhci: Move xhci MSI sync function to to xhci-pci")
Signed-off-by: Arnd Bergmann <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'drivers/usb/dwc2/hcd_queue.c')
0 files changed, 0 insertions, 0 deletions
