Re: [PATCH v3 6/8] iio: tcs3472: use local struct device * for remaining cases
From: Jonathan Cameron
Date: Tue May 26 2026 - 09:04:17 EST
On Fri, 22 May 2026 14:34:17 +0200
Aldo Conte <aldocontelk@xxxxxxxxx> wrote:
> Use the local 'struct device *dev' variable introduced for the devm
> calls also for the dev_info() calls in tcs3472_probe(), to keep the
> probe function consistent.
>
> No functional change.
>
> Signed-off-by: Aldo Conte <aldocontelk@xxxxxxxxx>
Hmm. My first instinct was to say drop these prints - because 'obviously'
the name attribute provides this information and doesn't fill up the kernel
log. Except (sigh) it doesn't. The driver reports "tcs3472" for all parts
supported. Fun question of whether we could get away with fixing that.
I think on balance doing so is too risky wrt to possible regression reports
so we are stuck.
That brings us back around to this change and argues in favour of keeping
the prints - so I guess we do that.
Applied to the testing branch of iio.git.
Thanks,
Jonathan
> ---
> v3:
> - New patch
>
> drivers/iio/light/tcs3472.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/iio/light/tcs3472.c b/drivers/iio/light/tcs3472.c
> index 4966abf83c18..f74e6633db45 100644
> --- a/drivers/iio/light/tcs3472.c
> +++ b/drivers/iio/light/tcs3472.c
> @@ -480,9 +480,9 @@ static int tcs3472_probe(struct i2c_client *client)
> return ret;
>
> if (ret == 0x44)
> - dev_info(&client->dev, "TCS34721/34725 found\n");
> + dev_info(dev, "TCS34721/34725 found\n");
> else if (ret == 0x4d)
> - dev_info(&client->dev, "TCS34723/34727 found\n");
> + dev_info(dev, "TCS34723/34727 found\n");
> else
> return -ENODEV;
>