Commit 2d815b84 authored by Lee Jones's avatar Lee Jones Committed by Jonathan Cameron

iio: accel: bma220_spi: Do not define 'struct acpi_device_id' when !CONFIG_ACPI

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

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

 drivers/iio/accel/bma220_spi.c:312:36: warning: ‘bma220_acpi_id’ defined but not used [-Wunused-const-variable=]
 312 | static const struct acpi_device_id bma220_acpi_id[] = {
 | ^~~~~~~~~~~~~~

Cc: Tiberiu Breana <tiberiu.a.breana@intel.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 0232d07c
...@@ -308,12 +308,14 @@ static const struct spi_device_id bma220_spi_id[] = { ...@@ -308,12 +308,14 @@ static const struct spi_device_id bma220_spi_id[] = {
{} {}
}; };
#ifdef CONFIG_ACPI
static const struct acpi_device_id bma220_acpi_id[] = { static const struct acpi_device_id bma220_acpi_id[] = {
{"BMA0220", 0}, {"BMA0220", 0},
{} {}
}; };
MODULE_DEVICE_TABLE(spi, bma220_spi_id); MODULE_DEVICE_TABLE(spi, bma220_spi_id);
#endif
static struct spi_driver bma220_driver = { static struct spi_driver bma220_driver = {
.driver = { .driver = {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment