Re: [PATCH RFC 2/4] i2c: mux: ltc4306: convert to using a pointer in i2c_device_id

From: Andy Shevchenko
Date: Tue Aug 15 2023 - 11:51:45 EST


On Mon, Aug 14, 2023 at 02:52:50PM -0700, Dmitry Torokhov wrote:
> Switch the driver to use newly added "data" pointer in i2c_device_id to
> streamline DT and legacy flows.

...

> chip = of_device_get_match_data(&client->dev);
> -
> if (!chip)
> - chip = &chips[i2c_match_id(ltc4306_id, client)->driver_data];
> + chip = i2c_match_id(ltc4306_id, client)->data;

The whole thing can be converted to i2c_device_get_match_data() with the new
helper from another thread. That said, I don't see value in this half-baked
change.

--
With Best Regards,
Andy Shevchenko