From 8027cc6835c7b4546a88c09e1a871bbf4e780000 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Sat, 19 Sep 2026 16:14:34 +0200 Subject: [PATCH] i2c: qcom-geni: Use device_set_node() helper Use the device_set_node() helper instead of manually setting adap.dev.of_node. This: 1. Ensures that if the parent has an of_node, adap.dev.fwnode also points to the parent's of_node rather than remaining NULL. 2. Removes the need to handle a parent with an ACPI fwnode specially, since the generic helpers take care of this too. Signed-off-by: Hans de Goede Reviewed-by: Konrad Dybcio Signed-off-by: Andi Shyti Link: https://patch.msgid.link/20260919141434.22999-1-johannes.goede@oss.qualcomm.com --- drivers/i2c/busses/i2c-qcom-geni.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/i2c/busses/i2c-qcom-geni.c b/drivers/i2c/busses/i2c-qcom-geni.c index ea854e78ef9c..01d1fdab5163 100644 --- a/drivers/i2c/busses/i2c-qcom-geni.c +++ b/drivers/i2c/busses/i2c-qcom-geni.c @@ -1142,9 +1142,6 @@ static int geni_i2c_probe(struct platform_device *pdev) gi2c->clk_freq_out = I2C_MAX_STANDARD_MODE_FREQ; } - if (has_acpi_companion(dev)) - ACPI_COMPANION_SET(&gi2c->adap.dev, ACPI_COMPANION(dev)); - gi2c->irq = platform_get_irq(pdev, 0); if (gi2c->irq < 0) return gi2c->irq; @@ -1170,7 +1167,7 @@ static int geni_i2c_probe(struct platform_device *pdev) i2c_set_adapdata(&gi2c->adap, gi2c); gi2c->adap.dev.parent = dev; - gi2c->adap.dev.of_node = dev->of_node; + device_set_node(&gi2c->adap.dev, dev_fwnode(dev)); strscpy(gi2c->adap.name, "Geni-I2C", sizeof(gi2c->adap.name)); pm_runtime_set_suspended(dev);