Message ID | 20200628123654.32830-12-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio:adc more of_match_ptr and similar removal | expand |
On Sun, 28 Jun 2020 13:36:42 +0100 Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > These just stop the driver being used with ACPI PRP0001 and > we are trying to clear them out of IIO to avoid them getting copied > into new drivers. > Also add the mod_devicetable.h include as we are using > struct of_device_id which is defined in there. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Akinobu Mita <akinobu.mita@gmail.com> Applied. Thanks, Jonathan > --- > drivers/iio/adc/max1118.c | 7 ++----- > 1 file changed, 2 insertions(+), 5 deletions(-) > > diff --git a/drivers/iio/adc/max1118.c b/drivers/iio/adc/max1118.c > index 273fbea2a515..01b20e420ac4 100644 > --- a/drivers/iio/adc/max1118.c > +++ b/drivers/iio/adc/max1118.c > @@ -18,6 +18,7 @@ > */ > > #include <linux/module.h> > +#include <linux/mod_devicetable.h> > #include <linux/spi/spi.h> > #include <linux/iio/iio.h> > #include <linux/iio/buffer.h> > @@ -280,8 +281,6 @@ static const struct spi_device_id max1118_id[] = { > }; > MODULE_DEVICE_TABLE(spi, max1118_id); > > -#ifdef CONFIG_OF > - > static const struct of_device_id max1118_dt_ids[] = { > { .compatible = "maxim,max1117" }, > { .compatible = "maxim,max1118" }, > @@ -290,12 +289,10 @@ static const struct of_device_id max1118_dt_ids[] = { > }; > MODULE_DEVICE_TABLE(of, max1118_dt_ids); > > -#endif > - > static struct spi_driver max1118_spi_driver = { > .driver = { > .name = "max1118", > - .of_match_table = of_match_ptr(max1118_dt_ids), > + .of_match_table = max1118_dt_ids, > }, > .probe = max1118_probe, > .remove = max1118_remove,
diff --git a/drivers/iio/adc/max1118.c b/drivers/iio/adc/max1118.c index 273fbea2a515..01b20e420ac4 100644 --- a/drivers/iio/adc/max1118.c +++ b/drivers/iio/adc/max1118.c @@ -18,6 +18,7 @@ */ #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/spi/spi.h> #include <linux/iio/iio.h> #include <linux/iio/buffer.h> @@ -280,8 +281,6 @@ static const struct spi_device_id max1118_id[] = { }; MODULE_DEVICE_TABLE(spi, max1118_id); -#ifdef CONFIG_OF - static const struct of_device_id max1118_dt_ids[] = { { .compatible = "maxim,max1117" }, { .compatible = "maxim,max1118" }, @@ -290,12 +289,10 @@ static const struct of_device_id max1118_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, max1118_dt_ids); -#endif - static struct spi_driver max1118_spi_driver = { .driver = { .name = "max1118", - .of_match_table = of_match_ptr(max1118_dt_ids), + .of_match_table = max1118_dt_ids, }, .probe = max1118_probe, .remove = max1118_remove,