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: light: max44000: 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-24-jic23@kernel.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

+2 -4
+2 -4
drivers/iio/light/max44000.c
··· 10 10 */ 11 11 12 12 #include <linux/module.h> 13 + #include <linux/mod_devicetable.h> 13 14 #include <linux/init.h> 14 15 #include <linux/i2c.h> 15 16 #include <linux/regmap.h> ··· 20 19 #include <linux/iio/buffer.h> 21 20 #include <linux/iio/trigger_consumer.h> 22 21 #include <linux/iio/triggered_buffer.h> 23 - #include <linux/acpi.h> 24 22 25 23 #define MAX44000_DRV_NAME "max44000" 26 24 ··· 603 603 }; 604 604 MODULE_DEVICE_TABLE(i2c, max44000_id); 605 605 606 - #ifdef CONFIG_ACPI 607 606 static const struct acpi_device_id max44000_acpi_match[] = { 608 607 {"MAX44000", 0}, 609 608 { } 610 609 }; 611 610 MODULE_DEVICE_TABLE(acpi, max44000_acpi_match); 612 - #endif 613 611 614 612 static struct i2c_driver max44000_driver = { 615 613 .driver = { 616 614 .name = MAX44000_DRV_NAME, 617 - .acpi_match_table = ACPI_PTR(max44000_acpi_match), 615 + .acpi_match_table = max44000_acpi_match, 618 616 }, 619 617 .probe = max44000_probe, 620 618 .id_table = max44000_id,