提交 2aac3388 编写于 作者: M Matthias Kaehlcke 提交者: Jonathan Cameron

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: NMatthias Kaehlcke <mka@chromium.org>
Acked-by: NLinus Walleij <linus.walleij@linaro.org>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 893bd0eb
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册