Re: [PATCH v3 6/6] iio: light: vcnl4000: use variables for I2C client and device instances

Andy Shevchenko
2026-03-16T11:10:45Z

On Mon, Mar 16, 2026 at 12:50:48PM +0200, Erikas Bitovtas wrote:
> On 3/16/26 12:39 PM, Andy Shevchenko wrote:

First of all, remove the content you are not replying to!

...

> >> - if (device_property_read_u32(&client->dev, "proximity-near-level",
> >> + if (device_property_read_u32(dev, "proximity-near-level",
> >> &data->near_level))
> >> data->near_level = 0;
> >
> > The 'if' is redundant, I think you can drop it at some point, probably to avoid
> > churn in the follow up
> >
> > - if (device_property_read_u32(&client->dev, "proximity-near-level",
> > - data->near_level = 0;
> > + device_property_read_u32(dev, "proximity-near-level", &data->near_level);
> >
>
> device_property_read_u32() throws an error if a property is missing.
> Would data->near_level be left without an assigned default value in that
> case?

Second, have you read my reply carefully?

--
With Best Regards,
Andy Shevchenko