Re: [PATCH 4/6] i2c: designware-amdisp: use i2c_adapter_dev()
From: Andy Shevchenko
Date: Sat Dec 27 2025 - 09:29:57 EST
On Tue, Dec 23, 2025 at 11:08:21AM +0100, Bartosz Golaszewski wrote:
> Use i2c_adapter_dev() where applicable in order to avoid direct
> dereferencing of struct device embedded within struct i2c_adapter.
...
> - ACPI_COMPANION_SET(&adap->dev, ACPI_COMPANION(&pdev->dev));
> + ACPI_COMPANION_SET(i2c_adapter_dev(adap), ACPI_COMPANION(&pdev->dev));
> adap->dev.of_node = pdev->dev.of_node;
Why not just replace these with i2c_dev_set_node()?
--
With Best Regards,
Andy Shevchenko