diff mbox series

[2/7] iio: light: cm32181: Add mod_devicetable.h and remove of_match_ptr

Message ID 20200419150206.43033-3-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 the ACPI PRP0001 route but more is mosty about
removing examples of this that might get copied into new drivers.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/iio/light/cm32181.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Alexandru Ardelean April 20, 2020, 6:05 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 the ACPI PRP0001 route but more is mosty about
> removing examples of this that might get copied into new drivers.
> 

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

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/light/cm32181.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
> index 5f4fb5674fa0..73c48f46220c 100644
> --- a/drivers/iio/light/cm32181.c
> +++ b/drivers/iio/light/cm32181.c
> @@ -9,6 +9,7 @@
>  #include <linux/i2c.h>
>  #include <linux/mutex.h>
>  #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/interrupt.h>
>  #include <linux/regulator/consumer.h>
>  #include <linux/iio/iio.h>
> @@ -354,7 +355,7 @@ MODULE_DEVICE_TABLE(of, cm32181_of_match);
>  static struct i2c_driver cm32181_driver = {
>  	.driver = {
>  		.name	= "cm32181",
> -		.of_match_table = of_match_ptr(cm32181_of_match),
> +		.of_match_table = cm32181_of_match,
>  	},
>  	.id_table       = cm32181_id,
>  	.probe		= cm32181_probe,
diff mbox series

Patch

diff --git a/drivers/iio/light/cm32181.c b/drivers/iio/light/cm32181.c
index 5f4fb5674fa0..73c48f46220c 100644
--- a/drivers/iio/light/cm32181.c
+++ b/drivers/iio/light/cm32181.c
@@ -9,6 +9,7 @@ 
 #include <linux/i2c.h>
 #include <linux/mutex.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/interrupt.h>
 #include <linux/regulator/consumer.h>
 #include <linux/iio/iio.h>
@@ -354,7 +355,7 @@  MODULE_DEVICE_TABLE(of, cm32181_of_match);
 static struct i2c_driver cm32181_driver = {
 	.driver = {
 		.name	= "cm32181",
-		.of_match_table = of_match_ptr(cm32181_of_match),
+		.of_match_table = cm32181_of_match,
 	},
 	.id_table       = cm32181_id,
 	.probe		= cm32181_probe,