Files
linux-stable-mirror/include/linux
Arnd Bergmann 664760c49d xhci: use pm_ptr() instead of #ifdef for CONFIG_PM conditionals
commit 130eac4170 upstream.

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: 9abe15d55d ("xhci: Move xhci MSI sync function to to xhci-pci")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20230328131114.1296430-1-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-02-01 18:22:34 +01:00
..
2024-01-25 14:37:54 -08:00
2024-07-05 09:12:55 +02:00
2023-12-20 15:44:30 +01:00
2024-06-21 14:53:19 +02:00
2024-06-21 14:53:46 +02:00
2024-10-17 15:07:44 +02:00
2023-10-25 11:54:20 +02:00
2024-06-21 14:53:28 +02:00
2024-11-08 16:22:03 +01:00
2023-11-20 11:06:46 +01:00
2023-06-21 15:45:38 +02:00
2024-04-13 12:58:31 +02:00
2024-06-21 14:53:36 +02:00
2024-01-25 14:37:40 -08:00
2023-11-28 16:54:53 +00:00
2023-10-25 11:54:13 +02:00
2023-10-25 11:54:13 +02:00
2025-02-01 18:22:32 +01:00
2025-01-09 13:24:59 +01:00
2024-07-05 09:12:55 +02:00
2023-05-17 11:48:09 +02:00
2024-02-23 08:41:51 +01:00
2024-10-17 15:07:57 +02:00