On Tue, 30 Jun 2020 10:25:24 +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 it's unlikely that this driver will ever be instantiated from > > ACPI PRP0001 there is little advantage in using the of_match_ptr > > protection. The switch of header is because we only use of_match_id > > in here and that is defined in mod_devicetable.h not of.h. > > > > Note the main reason for this patch is to avoid providing instances > > of of_match_ptr being used in IIO that might get copied into new drivers. > > > > Commit message is misleading. The change won't help with ACPI due to > syscon_regmap_lookup_by_phandle() call. I'd missed that. I'll drop this one. Thanks, Jonathan > > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@xxxxxxxxxx> > > Cc: Raveendra Padasalagi <raveendra.padasalagi@xxxxxxxxxxxx> > > --- > > drivers/iio/adc/bcm_iproc_adc.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/iio/adc/bcm_iproc_adc.c b/drivers/iio/adc/bcm_iproc_adc.c > > index 936da32faa9d..44e1e53ada72 100644 > > --- a/drivers/iio/adc/bcm_iproc_adc.c > > +++ b/drivers/iio/adc/bcm_iproc_adc.c > > @@ -4,7 +4,7 @@ > > */ > > > > #include <linux/module.h> > > -#include <linux/of.h> > > +#include <linux/mod_devicetable.h> > > #include <linux/io.h> > > #include <linux/clk.h> > > #include <linux/mfd/syscon.h> > > @@ -617,7 +617,7 @@ static struct platform_driver iproc_adc_driver = { > > .remove = iproc_adc_remove, > > .driver = { > > .name = "iproc-static-adc", > > - .of_match_table = of_match_ptr(iproc_adc_of_match), > > + .of_match_table = iproc_adc_of_match, > > }, > > }; > > module_platform_driver(iproc_adc_driver); > > -- > > 2.27.0 > > > >