Re: [PATCH 2/6] i2c: piix4: use i2c_adapter_dev()

From: Wolfram Sang

Date: Tue Jan 13 2026 - 05:24:11 EST


Hi Jean,

> > Use i2c_adapter_dev() where applicable in order to avoid direct
> > dereferencing of struct device embedded within struct i2c_adapter.
>
> I will confess that I don't know what is wrong with the current way of
> embedding struct device in a more specific device structure. I seem to
> recall it was fairly standard to do things this way back when we
> implemented this in the i2c subsystem. But I will trust you that this
> change is needed now.

I guess more people will wonder about the upcoming I2C core changes, so
I wrote a bit of explanation:

https://lore.kernel.org/all/aWYYZEPX-_1GfQtL@ninjato/

Happy hacking,

Wolfram