diff mbox series

[20/23] iio:adc:ti-adc161s626: Drop of_match_ptr protection.

Message ID 20200628123654.32830-21-jic23@kernel.org (mailing list archive)
State New, archived
Headers show
Series iio:adc more of_match_ptr and similar removal | expand

Commit Message

Jonathan Cameron June 28, 2020, 12:36 p.m. UTC
From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Dropping this allows use of ACPI PRP0001.

I'm also looking to drop all of_match_ptr use in IIO in order to avoid
it getting cut and paste into new drivers in the future.

Also add a direct include of mod_devicetable.h to reflect the use
of struct of_device_id.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Cc: Matt Ranostay <matt.ranostay@konsulko.com>
---
 drivers/iio/adc/ti-adc161s626.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Matt Ranostay June 28, 2020, 7:51 p.m. UTC | #1
On Sun, Jun 28, 2020 at 5:39 AM Jonathan Cameron <jic23@kernel.org> wrote:
>
> From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
>
> Dropping this allows use of ACPI PRP0001.
>
> I'm also looking to drop all of_match_ptr use in IIO in order to avoid
> it getting cut and paste into new drivers in the future.
>
> Also add a direct include of mod_devicetable.h to reflect the use
> of struct of_device_id.
>
> Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

> Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> ---
>  drivers/iio/adc/ti-adc161s626.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/iio/adc/ti-adc161s626.c b/drivers/iio/adc/ti-adc161s626.c
> index f27ca3161530..607791ffe7f0 100644
> --- a/drivers/iio/adc/ti-adc161s626.c
> +++ b/drivers/iio/adc/ti-adc161s626.c
> @@ -11,6 +11,7 @@
>   */
>
>  #include <linux/module.h>
> +#include <linux/mod_devicetable.h>
>  #include <linux/init.h>
>  #include <linux/err.h>
>  #include <linux/spi/spi.h>
> @@ -257,7 +258,7 @@ MODULE_DEVICE_TABLE(spi, ti_adc_id);
>  static struct spi_driver ti_adc_driver = {
>         .driver = {
>                 .name   = TI_ADC_DRV_NAME,
> -               .of_match_table = of_match_ptr(ti_adc_dt_ids),
> +               .of_match_table = ti_adc_dt_ids,
>         },
>         .probe          = ti_adc_probe,
>         .remove         = ti_adc_remove,
> --
> 2.27.0
>
Jonathan Cameron July 4, 2020, 5:31 p.m. UTC | #2
On Sun, 28 Jun 2020 12:51:09 -0700
Matt Ranostay <matt.ranostay@konsulko.com> wrote:

> On Sun, Jun 28, 2020 at 5:39 AM Jonathan Cameron <jic23@kernel.org> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@huawei.com>
> >
> > Dropping this allows use of ACPI PRP0001.
> >
> > I'm also looking to drop all of_match_ptr use in IIO in order to avoid
> > it getting cut and paste into new drivers in the future.
> >
> > Also add a direct include of mod_devicetable.h to reflect the use
> > of struct of_device_id.
> >
> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>  
> 
> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>
Applied.

Thanks,

Jonathan

> 
> > Cc: Matt Ranostay <matt.ranostay@konsulko.com>
> > ---
> >  drivers/iio/adc/ti-adc161s626.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/iio/adc/ti-adc161s626.c b/drivers/iio/adc/ti-adc161s626.c
> > index f27ca3161530..607791ffe7f0 100644
> > --- a/drivers/iio/adc/ti-adc161s626.c
> > +++ b/drivers/iio/adc/ti-adc161s626.c
> > @@ -11,6 +11,7 @@
> >   */
> >
> >  #include <linux/module.h>
> > +#include <linux/mod_devicetable.h>
> >  #include <linux/init.h>
> >  #include <linux/err.h>
> >  #include <linux/spi/spi.h>
> > @@ -257,7 +258,7 @@ MODULE_DEVICE_TABLE(spi, ti_adc_id);
> >  static struct spi_driver ti_adc_driver = {
> >         .driver = {
> >                 .name   = TI_ADC_DRV_NAME,
> > -               .of_match_table = of_match_ptr(ti_adc_dt_ids),
> > +               .of_match_table = ti_adc_dt_ids,
> >         },
> >         .probe          = ti_adc_probe,
> >         .remove         = ti_adc_remove,
> > --
> > 2.27.0
> >
diff mbox series

Patch

diff --git a/drivers/iio/adc/ti-adc161s626.c b/drivers/iio/adc/ti-adc161s626.c
index f27ca3161530..607791ffe7f0 100644
--- a/drivers/iio/adc/ti-adc161s626.c
+++ b/drivers/iio/adc/ti-adc161s626.c
@@ -11,6 +11,7 @@ 
  */
 
 #include <linux/module.h>
+#include <linux/mod_devicetable.h>
 #include <linux/init.h>
 #include <linux/err.h>
 #include <linux/spi/spi.h>
@@ -257,7 +258,7 @@  MODULE_DEVICE_TABLE(spi, ti_adc_id);
 static struct spi_driver ti_adc_driver = {
 	.driver = {
 		.name	= TI_ADC_DRV_NAME,
-		.of_match_table = of_match_ptr(ti_adc_dt_ids),
+		.of_match_table = ti_adc_dt_ids,
 	},
 	.probe		= ti_adc_probe,
 	.remove		= ti_adc_remove,