Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Andy Shevchenko and committed by
Jonathan Cameron
c87d5e94 d5f0da0c

+1 -4
+1 -4
drivers/iio/adc/ti-adc128s052.c
··· 9 9 * https://www.ti.com/lit/ds/symlink/adc124s021.pdf 10 10 */ 11 11 12 - #include <linux/acpi.h> 13 12 #include <linux/err.h> 14 13 #include <linux/spi/spi.h> 15 14 #include <linux/module.h> ··· 200 201 }; 201 202 MODULE_DEVICE_TABLE(spi, adc128_id); 202 203 203 - #ifdef CONFIG_ACPI 204 204 static const struct acpi_device_id adc128_acpi_match[] = { 205 205 { "AANT1280", (kernel_ulong_t)&adc128_config[2] }, 206 206 { } 207 207 }; 208 208 MODULE_DEVICE_TABLE(acpi, adc128_acpi_match); 209 - #endif 210 209 211 210 static struct spi_driver adc128_driver = { 212 211 .driver = { 213 212 .name = "adc128s052", 214 213 .of_match_table = adc128_of_match, 215 - .acpi_match_table = ACPI_PTR(adc128_acpi_match), 214 + .acpi_match_table = adc128_acpi_match, 216 215 }, 217 216 .probe = adc128_probe, 218 217 .id_table = adc128_id,