From: Lee Jones Date: Mon, 6 Jul 2020 13:33:41 +0000 (+0100) Subject: usb: host: xhci-plat: Do not define 'struct acpi_device_id' when !CONFIG_ACPI X-Git-Tag: v5.10.7~1952^2~111 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f535ad6c73c3306ec10311e4953c6df84d3b46ed;p=platform%2Fkernel%2Flinux-rpi.git usb: host: xhci-plat: Do not define 'struct acpi_device_id' when !CONFIG_ACPI Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI, struct usb_xhci_acpi_match becomes defined by unused. Fixes the following W=1 kernel build warning(s): drivers/usb/host/xhci-plat.c:457:36: warning: ‘usb_xhci_acpi_match’ defined but not used [-Wunused-const-variable=] 457 | static const struct acpi_device_id usb_xhci_acpi_match[] = { | ^~~~~~~~~~~~~~~~~~~ Cc: Mathias Nyman Cc: Andrzej Siewior Signed-off-by: Lee Jones Link: https://lore.kernel.org/r/20200706133341.476881-33-lee.jones@linaro.org Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/usb/host/xhci-plat.c b/drivers/usb/host/xhci-plat.c index f6b4089..3e15b70 100644 --- a/drivers/usb/host/xhci-plat.c +++ b/drivers/usb/host/xhci-plat.c @@ -454,12 +454,14 @@ static const struct dev_pm_ops xhci_plat_pm_ops = { NULL) }; +#ifdef CONFIG_ACPI static const struct acpi_device_id usb_xhci_acpi_match[] = { /* XHCI-compliant USB Controller */ { "PNP0D10", }, { } }; MODULE_DEVICE_TABLE(acpi, usb_xhci_acpi_match); +#endif static struct platform_driver usb_xhci_driver = { .probe = xhci_plat_probe,