Message ID | 20200419150206.43033-2-jic23@kernel.org (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | iio: light: clean out of_match_ptr and tidy headers | expand |
On Sun, 2020-04-19 at 16:02 +0100, jic23@kernel.org wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Whilst this enables ACPI binding or the device via PRP0001 the > primary aim is to remove potential for these two things to be > cut and paste into new drivers. Reviewed-by: Alexandru Ardelean <alexandru.ardelean@analog.com> > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > --- > drivers/iio/light/bh1780.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c > index a8361006dcd9..03f2d8d123c4 100644 > --- a/drivers/iio/light/bh1780.c > +++ b/drivers/iio/light/bh1780.c > @@ -13,7 +13,7 @@ > #include <linux/platform_device.h> > #include <linux/delay.h> > #include <linux/module.h> > -#include <linux/of.h> > +#include <linux/mod_devicetable.h> > #include <linux/pm_runtime.h> > #include <linux/iio/iio.h> > #include <linux/iio/sysfs.h> > @@ -273,13 +273,11 @@ static const struct i2c_device_id bh1780_id[] = { > > MODULE_DEVICE_TABLE(i2c, bh1780_id); > > -#ifdef CONFIG_OF > static const struct of_device_id of_bh1780_match[] = { > { .compatible = "rohm,bh1780gli", }, > {}, > }; > MODULE_DEVICE_TABLE(of, of_bh1780_match); > -#endif > > static struct i2c_driver bh1780_driver = { > .probe = bh1780_probe, > @@ -288,7 +286,7 @@ static struct i2c_driver bh1780_driver = { > .driver = { > .name = "bh1780", > .pm = &bh1780_dev_pm_ops, > - .of_match_table = of_match_ptr(of_bh1780_match), > + .of_match_table = of_bh1780_match, > }, > }; >
diff --git a/drivers/iio/light/bh1780.c b/drivers/iio/light/bh1780.c index a8361006dcd9..03f2d8d123c4 100644 --- a/drivers/iio/light/bh1780.c +++ b/drivers/iio/light/bh1780.c @@ -13,7 +13,7 @@ #include <linux/platform_device.h> #include <linux/delay.h> #include <linux/module.h> -#include <linux/of.h> +#include <linux/mod_devicetable.h> #include <linux/pm_runtime.h> #include <linux/iio/iio.h> #include <linux/iio/sysfs.h> @@ -273,13 +273,11 @@ static const struct i2c_device_id bh1780_id[] = { MODULE_DEVICE_TABLE(i2c, bh1780_id); -#ifdef CONFIG_OF static const struct of_device_id of_bh1780_match[] = { { .compatible = "rohm,bh1780gli", }, {}, }; MODULE_DEVICE_TABLE(of, of_bh1780_match); -#endif static struct i2c_driver bh1780_driver = { .probe = bh1780_probe, @@ -288,7 +286,7 @@ static struct i2c_driver bh1780_driver = { .driver = { .name = "bh1780", .pm = &bh1780_dev_pm_ops, - .of_match_table = of_match_ptr(of_bh1780_match), + .of_match_table = of_bh1780_match, }, };