]> git.baikalelectronics.ru Git - kernel.git/commitdiff
iio: light: st_uvis25: Add mod_devicetable.h and drop of_match_ptr
authorJonathan Cameron <Jonathan.Cameron@huawei.com>
Sun, 19 Apr 2020 15:02:05 +0000 (16:02 +0100)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Sat, 25 Apr 2020 14:44:36 +0000 (15:44 +0100)
Enables probing via ACPI PRP0001 and removes an example that we don't
want people to cut and paste into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
drivers/iio/light/st_uvis25_i2c.c
drivers/iio/light/st_uvis25_spi.c

index 400724069d1910554be7e3dadc5e7f34e40c27f2..98cd49eefe4567e01646598a2322c5a21f914b64 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/i2c.h>
 #include <linux/slab.h>
 #include <linux/regmap.h>
@@ -55,7 +56,7 @@ static struct i2c_driver st_uvis25_driver = {
        .driver = {
                .name = "st_uvis25_i2c",
                .pm = &st_uvis25_pm_ops,
-               .of_match_table = of_match_ptr(st_uvis25_i2c_of_match),
+               .of_match_table = st_uvis25_i2c_of_match,
        },
        .probe = st_uvis25_i2c_probe,
        .id_table = st_uvis25_i2c_id_table,
index cd3761a3ee3f4aaf09f20b69b4b69a2509559d2f..af9d94d1278724b0fea7bed40e99f0632c2b7998 100644 (file)
@@ -9,6 +9,7 @@
 
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/spi/spi.h>
 #include <linux/slab.h>
 #include <linux/regmap.h>
@@ -55,7 +56,7 @@ static struct spi_driver st_uvis25_driver = {
        .driver = {
                .name = "st_uvis25_spi",
                .pm = &st_uvis25_pm_ops,
-               .of_match_table = of_match_ptr(st_uvis25_spi_of_match),
+               .of_match_table = st_uvis25_spi_of_match,
        },
        .probe = st_uvis25_spi_probe,
        .id_table = st_uvis25_spi_id_table,