iio: light: ltr501: Drop ACPI_PTR() usage
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 31 Dec 2023 18:35:04 +0000 (18:35 +0000)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 23 Jan 2024 22:06:55 +0000 (22:06 +0000)
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>
drivers/iio/light/ltr501.c

index 061c122fdc5e70f5c0e2f3abef1386536202cedf..8c516ede911619bb4ee8f8a823f242b7aaa6af55 100644 (file)
@@ -10,6 +10,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
 #include <linux/err.h>
 #include <linux/delay.h>
@@ -1639,7 +1640,7 @@ static struct i2c_driver ltr501_driver = {
                .name   = LTR501_DRV_NAME,
                .of_match_table = ltr501_of_match,
                .pm     = pm_sleep_ptr(&ltr501_pm_ops),
-               .acpi_match_table = ACPI_PTR(ltr_acpi_match),
+               .acpi_match_table = ltr_acpi_match,
        },
        .probe = ltr501_probe,
        .remove = ltr501_remove,