summaryrefslogtreecommitdiff
path: root/drivers/iio
diff options
context:
space:
mode:
authorMatthias Kaehlcke <mka@chromium.org>2017-05-19 14:28:53 -0700
committerJonathan Cameron <jic23@kernel.org>2017-05-20 17:07:09 +0100
commit14b39dce373191f8fd7a703a643dccf0f97f0323 (patch)
treed87c7688f2d8cb07e7cf2ef351f266d41ecfa19d /drivers/iio
parent138bc7969c24c6cbba28e919c2376ad10a46fc60 (diff)
iio: light: isl29018: Only declare ACPI table when ACPI is enabled
This fixes the following warning when building with clang: drivers/iio/light/isl29018.c:808:36: error: variable 'isl29018_acpi_match' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Reviewed-by: Guenter Roeck <groeck@chromium.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio')
-rw-r--r--drivers/iio/light/isl29018.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/light/isl29018.c b/drivers/iio/light/isl29018.c
index 917dd8b43e72..61f5924b472d 100644
--- a/drivers/iio/light/isl29018.c
+++ b/drivers/iio/light/isl29018.c
@@ -807,6 +807,7 @@ static SIMPLE_DEV_PM_OPS(isl29018_pm_ops, isl29018_suspend, isl29018_resume);
#define ISL29018_PM_OPS NULL
#endif
+#ifdef CONFIG_ACPI
static const struct acpi_device_id isl29018_acpi_match[] = {
{"ISL29018", isl29018},
{"ISL29023", isl29023},
@@ -814,6 +815,7 @@ static const struct acpi_device_id isl29018_acpi_match[] = {
{},
};
MODULE_DEVICE_TABLE(acpi, isl29018_acpi_match);
+#endif
static const struct i2c_device_id isl29018_id[] = {
{"isl29018", isl29018},