summaryrefslogtreecommitdiffstats
path: root/drivers/iio/magnetometer
diff options
context:
space:
mode:
authorMatthias Kaehlcke2017-06-27 02:25:33 +0200
committerJonathan Cameron2017-07-02 11:24:54 +0200
commit2aac3388f1682d6208f6759c338a7efa37b0deca (patch)
tree33de537d62850da75655858d772ecaced6645113 /drivers/iio/magnetometer
parentiio: sca3000: Remove trailing whitespace (diff)
downloadkernel-qcow2-linux-2aac3388f1682d6208f6759c338a7efa37b0deca.tar.gz
kernel-qcow2-linux-2aac3388f1682d6208f6759c338a7efa37b0deca.tar.xz
kernel-qcow2-linux-2aac3388f1682d6208f6759c338a7efa37b0deca.zip
iio: magnetometer: Only declare ACPI table when ACPI is enable
Don't inflate the kernel size with data that isn't used. The conditional declaration also fixes the following warning when building with clang: drivers/iio/magnetometer/ak8975.c:704:36: error: variable 'ak_acpi_match' is not needed and will not be emitted [-Werror,-Wunneeded-internal-declaration] Signed-off-by: Matthias Kaehlcke <mka@chromium.org> Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/magnetometer')
-rw-r--r--drivers/iio/magnetometer/ak8975.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/iio/magnetometer/ak8975.c b/drivers/iio/magnetometer/ak8975.c
index 825369fb1c57..4ff883942f7b 100644
--- a/drivers/iio/magnetometer/ak8975.c
+++ b/drivers/iio/magnetometer/ak8975.c
@@ -784,6 +784,7 @@ static const struct iio_info ak8975_info = {
.driver_module = THIS_MODULE,
};
+#ifdef CONFIG_ACPI
static const struct acpi_device_id ak_acpi_match[] = {
{"AK8975", AK8975},
{"AK8963", AK8963},
@@ -793,6 +794,7 @@ static const struct acpi_device_id ak_acpi_match[] = {
{ },
};
MODULE_DEVICE_TABLE(acpi, ak_acpi_match);
+#endif
static const char *ak8975_match_acpi_device(struct device *dev,
enum asahi_compass_chipset *chipset)