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

iio: light: ltr501: Drop ACPI_PTR() usage

Avoiding unused variable warnings when using this macro adds
complexity that in simple cases like this one is not justified
for the small saving in data.

Include linux/mod_devicetable.h which includes the definition of
struct acpi_device_id (hence somewhat related to the main change)

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

+2 -1
+2 -1
drivers/iio/light/ltr501.c
··· 10 10 */ 11 11 12 12 #include <linux/module.h> 13 + #include <linux/mod_devicetable.h> 13 14 #include <linux/i2c.h> 14 15 #include <linux/err.h> 15 16 #include <linux/delay.h> ··· 1640 1639 .name = LTR501_DRV_NAME, 1641 1640 .of_match_table = ltr501_of_match, 1642 1641 .pm = pm_sleep_ptr(&ltr501_pm_ops), 1643 - .acpi_match_table = ACPI_PTR(ltr_acpi_match), 1642 + .acpi_match_table = ltr_acpi_match, 1644 1643 }, 1645 1644 .probe = ltr501_probe, 1646 1645 .remove = ltr501_remove,