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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux GPIO]     [Linux SPI]     [Linux Hardward Monitoring]     [LM Sensors]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux