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: pressure: hp206c: drop ACPI_PTR() and CONFIG_ACPI guards

The complexity of config guards needed for ACPI_PTR() is not worthwhile
for the small amount of saved data. This example was doing it correctly
but I am proposing dropping this so as to reduce chance of cut and paste
where it is done wrong. Also drop now unneeded linux/acpi.h include and
added linux/mod_devicetable.h for struct acpi_device_id definition.

Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
Link: https://lore.kernel.org/r/20231231183514.566609-23-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+2 -4
+2 -4
drivers/iio/pressure/hp206c.c
··· 11 11 */ 12 12 13 13 #include <linux/module.h> 14 + #include <linux/mod_devicetable.h> 14 15 #include <linux/i2c.h> 15 16 #include <linux/iio/iio.h> 16 17 #include <linux/iio/sysfs.h> 17 18 #include <linux/delay.h> 18 19 #include <linux/util_macros.h> 19 - #include <linux/acpi.h> 20 20 21 21 #include <asm/unaligned.h> 22 22 ··· 400 400 }; 401 401 MODULE_DEVICE_TABLE(i2c, hp206c_id); 402 402 403 - #ifdef CONFIG_ACPI 404 403 static const struct acpi_device_id hp206c_acpi_match[] = { 405 404 {"HOP206C", 0}, 406 405 { }, 407 406 }; 408 407 MODULE_DEVICE_TABLE(acpi, hp206c_acpi_match); 409 - #endif 410 408 411 409 static struct i2c_driver hp206c_driver = { 412 410 .probe = hp206c_probe, 413 411 .id_table = hp206c_id, 414 412 .driver = { 415 413 .name = "hp206c", 416 - .acpi_match_table = ACPI_PTR(hp206c_acpi_match), 414 + .acpi_match_table = hp206c_acpi_match, 417 415 }, 418 416 }; 419 417