Message ID | 20210611171355.202903-3-jic23@kernel.org (mailing list archive) |
---|---|
State | Superseded |
Headers | show |
Series | iio:accel: Header Cleanups. | expand |
On Fri, Jun 11, 2021 at 7:12 PM Jonathan Cameron <jic23@kernel.org> wrote: > From: Jonathan Cameron <Jonathan.Cameron@huawei.com> > > Whilst doing header cleanup I noticed this driver makes very superficial > use of of_* interfaces. Hence move to the generic firmware forms. > > Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com> > Cc: Jonathan Bakker <xc-racer2@live.ca> > Cc: Linus Walleij <linus.walleij@linaro.org> Looks correct! Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Yours, Linus Walleij
diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 4a07e60c0e21..0e0d9317c084 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -17,8 +17,7 @@ #include <linux/i2c.h> #include <linux/interrupt.h> #include <linux/delay.h> -#include <linux/of_device.h> -#include <linux/of.h> +#include <linux/property.h> #include <linux/bitops.h> #include <linux/regulator/consumer.h> #include <linux/slab.h> @@ -995,8 +994,8 @@ static int bma180_probe(struct i2c_client *client, data = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); data->client = client; - if (client->dev.of_node) - chip = (enum chip_ids)of_device_get_match_data(dev); + if (dev_fwnode(dev)) + chip = (enum chip_ids)device_get_match_data(dev); else chip = id->driver_data; data->part_info = &bma180_part_info[chip];