diff mbox series

[6/7] iio: light: st_uvis25: Add mod_devicetable.h and drop of_match_ptr

Message ID 20200419150206.43033-7-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series iio: light: clean out of_match_ptr and tidy headers | expand

Commit Message

Jonathan Cameron April 19, 2020, 3:02 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

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>
---
 drivers/iio/light/st_uvis25_i2c.c | 3 ++-
 drivers/iio/light/st_uvis25_spi.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

Comments

Alexandru Ardelean April 20, 2020, 6:08 a.m. UTC | #1
On Sun, 2020-04-19 at 16:02 +0100, jic23@kernel.org wrote:
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> 
> Enables probing via ACPI PRP0001 and removes an example that we don't
> want people to cut and paste into new drivers.
> 

Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com>

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/light/st_uvis25_i2c.c | 3 ++-
>  drivers/iio/light/st_uvis25_spi.c | 3 ++-
>  2 files changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/iio/light/st_uvis25_i2c.c
> b/drivers/iio/light/st_uvis25_i2c.c
> index 400724069d19..98cd49eefe45 100644
> --- a/drivers/iio/light/st_uvis25_i2c.c
> +++ b/drivers/iio/light/st_uvis25_i2c.c
> @@ -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,
> diff --git a/drivers/iio/light/st_uvis25_spi.c
> b/drivers/iio/light/st_uvis25_spi.c
> index cd3761a3ee3f..af9d94d12787 100644
> --- a/drivers/iio/light/st_uvis25_spi.c
> +++ b/drivers/iio/light/st_uvis25_spi.c
> @@ -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,
diff mbox series

Patch

diff --git a/drivers/iio/light/st_uvis25_i2c.c b/drivers/iio/light/st_uvis25_i2c.c
index 400724069d19..98cd49eefe45 100644
--- a/drivers/iio/light/st_uvis25_i2c.c
+++ b/drivers/iio/light/st_uvis25_i2c.c
@@ -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,
diff --git a/drivers/iio/light/st_uvis25_spi.c b/drivers/iio/light/st_uvis25_spi.c
index cd3761a3ee3f..af9d94d12787 100644
--- a/drivers/iio/light/st_uvis25_spi.c
+++ b/drivers/iio/light/st_uvis25_spi.c
@@ -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,