Message ID | 20200628123654.32830-13-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:43 +0100 Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > These just prevent the driver being used with ACPI PRP0001. > They also get cut and paste into new drivers and we want to discourage > this from happening by cleaning it out in general. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Oskar Andero <oskar.andero@gmail.com> > Cc: Søren Andersen <san@rosetechnology.dk> > Cc: Lukas Wunner <lukas@wunner.de> Applied > --- > drivers/iio/adc/mcp320x.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c > index e533f1064cf8..bb37e66ff7dc 100644 > --- a/drivers/iio/adc/mcp320x.c > +++ b/drivers/iio/adc/mcp320x.c > @@ -41,6 +41,7 @@ > #include <linux/delay.h> > #include <linux/spi/spi.h> > #include <linux/module.h> > +#include <linux/mod_devicetable.h> > #include <linux/iio/iio.h> > #include <linux/regulator/consumer.h> > > @@ -469,7 +470,6 @@ static int mcp320x_remove(struct spi_device *spi) > return 0; > } > > -#if defined(CONFIG_OF) > static const struct of_device_id mcp320x_dt_ids[] = { > /* NOTE: The use of compatibles with no vendor prefix is deprecated. */ > { .compatible = "mcp3001" }, > @@ -497,7 +497,6 @@ static const struct of_device_id mcp320x_dt_ids[] = { > { } > }; > MODULE_DEVICE_TABLE(of, mcp320x_dt_ids); > -#endif > > static const struct spi_device_id mcp320x_id[] = { > { "mcp3001", mcp3001 }, > @@ -520,7 +519,7 @@ MODULE_DEVICE_TABLE(spi, mcp320x_id); > static struct spi_driver mcp320x_driver = { > .driver = { > .name = "mcp320x", > - .of_match_table = of_match_ptr(mcp320x_dt_ids), > + .of_match_table = mcp320x_dt_ids, > }, > .probe = mcp320x_probe, > .remove = mcp320x_remove,
diff --git a/drivers/iio/adc/mcp320x.c b/drivers/iio/adc/mcp320x.c index e533f1064cf8..bb37e66ff7dc 100644 --- a/drivers/iio/adc/mcp320x.c +++ b/drivers/iio/adc/mcp320x.c @@ -41,6 +41,7 @@ #include <linux/delay.h> #include <linux/spi/spi.h> #include <linux/module.h> +#include <linux/mod_devicetable.h> #include <linux/iio/iio.h> #include <linux/regulator/consumer.h> @@ -469,7 +470,6 @@ static int mcp320x_remove(struct spi_device *spi) return 0; } -#if defined(CONFIG_OF) static const struct of_device_id mcp320x_dt_ids[] = { /* NOTE: The use of compatibles with no vendor prefix is deprecated. */ { .compatible = "mcp3001" }, @@ -497,7 +497,6 @@ static const struct of_device_id mcp320x_dt_ids[] = { { } }; MODULE_DEVICE_TABLE(of, mcp320x_dt_ids); -#endif static const struct spi_device_id mcp320x_id[] = { { "mcp3001", mcp3001 }, @@ -520,7 +519,7 @@ MODULE_DEVICE_TABLE(spi, mcp320x_id); static struct spi_driver mcp320x_driver = { .driver = { .name = "mcp320x", - .of_match_table = of_match_ptr(mcp320x_dt_ids), + .of_match_table = mcp320x_dt_ids, }, .probe = mcp320x_probe, .remove = mcp320x_remove,