diff mbox series

[RFC,4/6] i2c: aspeed: Set the fwnode for the adap->dev

Message ID 20230525152203.32190-5-Jonathan.Cameron@huawei.com
State New
Headers show
Series [RFC,1/6] i2c: acpi: set slave mode flag | expand

Commit Message

Jonathan Cameron May 25, 2023, 3:22 p.m. UTC
This is needed for the bus matching used for ACPI based
i2c client registration.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/i2c/busses/i2c-aspeed.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Andy Shevchenko May 26, 2023, 9:13 p.m. UTC | #1
On Thu, May 25, 2023 at 6:24 PM Jonathan Cameron
<Jonathan.Cameron@huawei.com> wrote:
>
> This is needed for the bus matching used for ACPI based
> i2c client registration.

...

> +       device_set_node(&bus->adap.dev, dev_fwnode(&pdev->dev));

Please, remove this
https://elixir.bootlin.com/linux/v6.4-rc1/source/drivers/i2c/busses/i2c-aspeed.c#L1029

at the same time.

>         ret = i2c_add_adapter(&bus->adap);
>         if (ret < 0)
>                 return ret;
diff mbox series

Patch

diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c
index 73508fb9dc08..adbb93444d7a 100644
--- a/drivers/i2c/busses/i2c-aspeed.c
+++ b/drivers/i2c/busses/i2c-aspeed.c
@@ -1044,6 +1044,8 @@  static int aspeed_i2c_probe_bus(struct platform_device *pdev)
 	if (ret < 0)
 		return ret;
 
+	device_set_node(&bus->adap.dev, dev_fwnode(&pdev->dev));
+
 	ret = i2c_add_adapter(&bus->adap);
 	if (ret < 0)
 		return ret;