diff options
author | Andy Shevchenko <andriy.shevchenko@linux.intel.com> | 2023-01-02 19:34:49 +0200 |
---|---|---|
committer | Jonathan Cameron <Jonathan.Cameron@huawei.com> | 2023-01-08 12:12:10 +0000 |
commit | c87d5e94fca8e2fc681a808608bddfb01878f791 (patch) | |
tree | 411a64d307ad18376beb99484d71f446cdd549c0 | |
parent | d5f0da0c6972199a39d692309d9e0e09c57a3844 (diff) | |
download | linux-c87d5e94fca8e2fc681a808608bddfb01878f791.tar.gz linux-c87d5e94fca8e2fc681a808608bddfb01878f791.tar.bz2 linux-c87d5e94fca8e2fc681a808608bddfb01878f791.zip |
iio: adc: ti-adc128s052: Drop anti-pattern of ACPI_PTR() use
ACPI_PTR() is more harmful than helpful. For example, in this case
if CONFIG_ACPI=n, the ID table left unused and code is obfuscated
by ifdeffery.
Drop anti-pattern of ACPI_PTR() use.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Link: https://lore.kernel.org/r/20230102173450.29882-3-andriy.shevchenko@linux.intel.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
-rw-r--r-- | drivers/iio/adc/ti-adc128s052.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iio/adc/ti-adc128s052.c b/drivers/iio/adc/ti-adc128s052.c index 4a15b6bea310..0f737e9df0fa 100644 --- a/drivers/iio/adc/ti-adc128s052.c +++ b/drivers/iio/adc/ti-adc128s052.c @@ -9,7 +9,6 @@ * https://www.ti.com/lit/ds/symlink/adc124s021.pdf */ -#include <linux/acpi.h> #include <linux/err.h> #include <linux/spi/spi.h> #include <linux/module.h> @@ -201,19 +200,17 @@ static const struct spi_device_id adc128_id[] = { }; MODULE_DEVICE_TABLE(spi, adc128_id); -#ifdef CONFIG_ACPI static const struct acpi_device_id adc128_acpi_match[] = { { "AANT1280", (kernel_ulong_t)&adc128_config[2] }, { } }; MODULE_DEVICE_TABLE(acpi, adc128_acpi_match); -#endif static struct spi_driver adc128_driver = { .driver = { .name = "adc128s052", .of_match_table = adc128_of_match, - .acpi_match_table = ACPI_PTR(adc128_acpi_match), + .acpi_match_table = adc128_acpi_match, }, .probe = adc128_probe, .id_table = adc128_id, |