[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <174340899625.3687388.14660711739063778026@ping.linuxembedded.co.uk>
Date: Mon, 31 Mar 2025 09:16:36 +0100
From: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
To: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>, linux-kernel@...r.kernel.org, linux-media@...r.kernel.org
Cc: acopo Mondi <jacopo+renesas@...ndi.org>, Laurent Pinchart <laurent.pinchart+renesas@...asonboard.com>, Mauro Carvalho Chehab <mchehab@...nel.org>, Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Subject: Re: [PATCH v1 1/1] media: i2c: rdacm2x: Make use of device properties
Quoting Andy Shevchenko (2025-03-31 08:34:35)
> Convert the module to be property provider agnostic and allow
> it to be used on non-OF platforms.
>
Looks reasonable to me.
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
> ---
> drivers/media/i2c/rdacm20.c | 5 ++---
> drivers/media/i2c/rdacm21.c | 5 ++---
> 2 files changed, 4 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/media/i2c/rdacm20.c b/drivers/media/i2c/rdacm20.c
> index b8bd8354d100..dcab63d19baf 100644
> --- a/drivers/media/i2c/rdacm20.c
> +++ b/drivers/media/i2c/rdacm20.c
> @@ -16,10 +16,10 @@
> */
>
> #include <linux/delay.h>
> -#include <linux/fwnode.h>
> #include <linux/init.h>
> #include <linux/i2c.h>
> #include <linux/module.h>
> +#include <linux/property.h>
> #include <linux/slab.h>
> #include <linux/videodev2.h>
>
> @@ -575,8 +575,7 @@ static int rdacm20_probe(struct i2c_client *client)
> dev->dev = &client->dev;
> dev->serializer.client = client;
>
> - ret = of_property_read_u32_array(client->dev.of_node, "reg",
> - dev->addrs, 2);
> + ret = device_property_read_u32_array(&client->dev, "reg", dev->addrs, 2);
> if (ret < 0) {
> dev_err(dev->dev, "Invalid DT reg property: %d\n", ret);
But this is no longer a DT reg property ?
> return -EINVAL;
> diff --git a/drivers/media/i2c/rdacm21.c b/drivers/media/i2c/rdacm21.c
> index 3e22df36354f..5ea6988de48b 100644
> --- a/drivers/media/i2c/rdacm21.c
> +++ b/drivers/media/i2c/rdacm21.c
> @@ -11,10 +11,10 @@
> */
>
> #include <linux/delay.h>
> -#include <linux/fwnode.h>
> #include <linux/init.h>
> #include <linux/i2c.h>
> #include <linux/module.h>
> +#include <linux/property.h>
> #include <linux/slab.h>
> #include <linux/videodev2.h>
>
> @@ -551,8 +551,7 @@ static int rdacm21_probe(struct i2c_client *client)
> dev->dev = &client->dev;
> dev->serializer.client = client;
>
> - ret = of_property_read_u32_array(client->dev.of_node, "reg",
> - dev->addrs, 2);
> + ret = device_property_read_u32_array(&client->dev, "reg", dev->addrs, 2);
> if (ret < 0) {
> dev_err(dev->dev, "Invalid DT reg property: %d\n", ret);
Same here ...
With those fixed,
Reviewed-by: Kieran Bingham <kieran.bingham+renesas@...asonboard.com>
> return -EINVAL;
> --
> 2.47.2
>
Powered by blists - more mailing lists