Re: [PATCH 01/23] iio:adc:lpc32xx: Drop of_match_ptr protection

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Jun 2020 10:01:29 +0300
Andy Shevchenko <andy.shevchenko@xxxxxxxxx> wrote:

> On Sun, Jun 28, 2020 at 3:39 PM Jonathan Cameron <jic23@xxxxxxxxxx> wrote:
> >
> > From: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> >
> > Whilst is unlikely anyone will be using this part with an ACPI PRP0001
> > based binding any time soon, we are getting a lot of cut and pasting
> > of this pattern so I am looking to remove it entirely from IIO.
> >
> > In this case CONFIG_OF protections also removed and
> > mod_devicetable.h include added given direct use of struct of_device_id.
> >  
> 
> Yes, it also fixes indirect inclusion of of.h.
> LGTM!
> 
Thanks, added RB as per cover letter reply.

Applied to the togreg branch of iio.git and pushed out as testing to
see if I missed anything.

Thanks,

Jonathan

> > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx>
> > ---
> >  drivers/iio/adc/lpc32xx_adc.c | 5 ++---
> >  1 file changed, 2 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/iio/adc/lpc32xx_adc.c b/drivers/iio/adc/lpc32xx_adc.c
> > index bc2712a48844..b56ce15255cf 100644
> > --- a/drivers/iio/adc/lpc32xx_adc.c
> > +++ b/drivers/iio/adc/lpc32xx_adc.c
> > @@ -14,6 +14,7 @@
> >  #include <linux/interrupt.h>
> >  #include <linux/io.h>
> >  #include <linux/module.h>
> > +#include <linux/mod_devicetable.h>  
> 
> 
> >  #include <linux/platform_device.h>
> >  #include <linux/regulator/consumer.h>
> >
> > @@ -209,19 +210,17 @@ static int lpc32xx_adc_probe(struct platform_device *pdev)
> >         return 0;
> >  }
> >
> > -#ifdef CONFIG_OF
> >  static const struct of_device_id lpc32xx_adc_match[] = {
> >         { .compatible = "nxp,lpc3220-adc" },
> >         {},
> >  };
> >  MODULE_DEVICE_TABLE(of, lpc32xx_adc_match);
> > -#endif
> >
> >  static struct platform_driver lpc32xx_adc_driver = {
> >         .probe          = lpc32xx_adc_probe,
> >         .driver         = {
> >                 .name   = LPC32XXAD_NAME,
> > -               .of_match_table = of_match_ptr(lpc32xx_adc_match),
> > +               .of_match_table = lpc32xx_adc_match,
> >         },
> >  };
> >
> > --
> > 2.27.0
> >  
> 
> 




[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux