usb: dwc3: dwc3-qcom: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
authorLee Jones <lee.jones@linaro.org>
Mon, 6 Jul 2020 13:33:38 +0000 (14:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 9 Jul 2020 15:19:59 +0000 (17:19 +0200)
commitb789710de583f069609cc626651556b81e6f23dc
treeb22cf54945c62057402a3454b2eb1df7fe02ef06
parent6dba06ceee70e83f6baa817867560b2272de0f0b
usb: dwc3: dwc3-qcom: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct dwc3_qcom_acpi_match becomes defined by unused.

Also need to place the platform data obtained via the matching process
inside the #ifdef, else that becomes unused too.

Fixes the following W=1 kernel build warning(s):

 drivers/usb/dwc3/dwc3-qcom.c:761:36: warning: ‘dwc3_qcom_acpi_match’ defined but not used [-Wunused-const-variable=]
 761 | static const struct acpi_device_id dwc3_qcom_acpi_match[] = {
 | ^~~~~~~~~~~~~~~~~~~~

Cc: Andy Gross <agross@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>
Cc: Felipe Balbi <balbi@kernel.org>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Cc: linux-arm-msm@vger.kernel.org
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Link: https://lore.kernel.org/r/20200706133341.476881-30-lee.jones@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/dwc3/dwc3-qcom.c