[PATCH] iio: am2315: Make am2315_acpi_id depend on CONFIG_ACPI

From: Guenter Roeck
Date: Tue May 04 2021 - 10:30:26 EST


With CONFIG_ACPI=n and -Werror, 0-day reports:

drivers/iio/humidity/am2315.c:259:36: error:
'am2315_acpi_id' defined but not used

Reported-by: kernel test robot <lkp@xxxxxxxxx>
Signed-off-by: Guenter Roeck <linux@xxxxxxxxxxxx>
---
drivers/iio/humidity/am2315.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iio/humidity/am2315.c b/drivers/iio/humidity/am2315.c
index 23bc9c784ef4..e876b039c38f 100644
--- a/drivers/iio/humidity/am2315.c
+++ b/drivers/iio/humidity/am2315.c
@@ -256,12 +256,13 @@ static const struct i2c_device_id am2315_i2c_id[] = {
};
MODULE_DEVICE_TABLE(i2c, am2315_i2c_id);

+#ifdef CONFIG_ACPI
static const struct acpi_device_id am2315_acpi_id[] = {
{"AOS2315", 0},
{}
};
-
MODULE_DEVICE_TABLE(acpi, am2315_acpi_id);
+#endif

static struct i2c_driver am2315_driver = {
.driver = {
--
2.25.1