iio:adc:ti-adc084s021: drop of_match_ptr protection
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 28 Jun 2020 12:36:48 +0000 (13:36 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 7 Jul 2020 19:24:10 +0000 (20:24 +0100)
Allows ACPI PRP0001 to be used with this driver.
Also adds mod_devicetable.h header as the driver is directly using
struct of_device_id which is defined in that file.

I'm also trying to clear out of_match_ptr use in IIO to avoid it
being cut and paste into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: MÃ¥rten Lindahl <martenli@axis.com>
Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com>
drivers/iio/adc/ti-adc084s021.c

index c2db2435f419e75340da4c87c14d857ee5870bd0..5678bf7499b17d3bf9420e275b93ba411c00d8b6 100644 (file)
@@ -10,6 +10,7 @@
 #include <linux/err.h>
 #include <linux/spi/spi.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/interrupt.h>
 #include <linux/iio/iio.h>
 #include <linux/iio/buffer.h>
@@ -254,7 +255,7 @@ MODULE_DEVICE_TABLE(spi, adc084s021_id);
 static struct spi_driver adc084s021_driver = {
        .driver = {
                .name = ADC084S021_DRIVER_NAME,
-               .of_match_table = of_match_ptr(adc084s021_of_match),
+               .of_match_table = adc084s021_of_match,
        },
        .probe = adc084s021_probe,
        .id_table = adc084s021_id,