spi: spi-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI
authorLee Jones <lee.jones@linaro.org>
Fri, 17 Jul 2020 13:54:24 +0000 (14:54 +0100)
committerMark Brown <broonie@kernel.org>
Fri, 17 Jul 2020 15:38:56 +0000 (16:38 +0100)
commit85ed0f63c0e362afc51e541a8216a58094c36f6b
tree993209522708eeb83e26b8d9538d46b2e6089512
parent9b2d611929afefee78037c92919d633aae35636a
spi: spi-amd: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

Since ACPI_PTR() is used to NULLify the value when !CONFIG_ACPI,
struct 'spi_acpi_match' becomes defined but unused.

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

 drivers/spi/spi-amd.c:297:36: warning: ‘spi_acpi_match’ defined but not used [-Wunused-const-variable=]
 297 | static const struct acpi_device_id spi_acpi_match[] = {
 | ^~~~~~~~~~~~~~

Signed-off-by: Lee Jones <lee.jones@linaro.org>
Cc: Sanjay R Mehta <sanju.mehta@amd.com>
Link: https://lore.kernel.org/r/20200717135424.2442271-15-lee.jones@linaro.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/spi/spi-amd.c