diff mbox series

[5/7] iio: light: opt3001: Add mod_devicetable.h and drop use of of_match_ptr

Message ID 20200419150206.43033-6-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 but mostly about removing examples
that might be copied to new drivers.

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

Comments

Alexandru Ardelean April 20, 2020, 6:06 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 but mostly about removing examples
> that might be copied to new drivers.
> 

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

> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> ---
>  drivers/iio/light/opt3001.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
> index 92004a2563ea..82abfa57b59c 100644
> --- a/drivers/iio/light/opt3001.c
> +++ b/drivers/iio/light/opt3001.c
> @@ -16,6 +16,7 @@
>  #include <linux/irq.h>
>  #include <linux/kernel.h>
>  #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/mutex.h>
>  #include <linux/slab.h>
>  #include <linux/types.h>
> @@ -844,7 +845,7 @@ static struct i2c_driver opt3001_driver = {
>  
>  	.driver = {
>  		.name = "opt3001",
> -		.of_match_table = of_match_ptr(opt3001_of_match),
> +		.of_match_table = opt3001_of_match,
>  	},
>  };
>
diff mbox series

Patch

diff --git a/drivers/iio/light/opt3001.c b/drivers/iio/light/opt3001.c
index 92004a2563ea..82abfa57b59c 100644
--- a/drivers/iio/light/opt3001.c
+++ b/drivers/iio/light/opt3001.c
@@ -16,6 +16,7 @@ 
 #include <linux/irq.h>
 #include <linux/kernel.h>
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/mutex.h>
 #include <linux/slab.h>
 #include <linux/types.h>
@@ -844,7 +845,7 @@  static struct i2c_driver opt3001_driver = {
 
 	.driver = {
 		.name = "opt3001",
-		.of_match_table = of_match_ptr(opt3001_of_match),
+		.of_match_table = opt3001_of_match,
 	},
 };