]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
i2c: synquacer: fix enumeration of slave devices
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Tue, 30 Apr 2019 09:47:34 +0000 (11:47 +0200)
committerWolfram Sang <wsa@the-dreams.de>
Thu, 2 May 2019 16:38:53 +0000 (18:38 +0200)
The I2C host driver for SynQuacer fails to populate the of_node and
ACPI companion fields of the struct i2c_adapter it instantiates,
resulting in enumeration of the subordinate I2C bus to fail.

Fixes: 0d676a6c4390 ("i2c: add support for Socionext SynQuacer I2C controller")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-synquacer.c

index d18b0941b71a4d37d5b896645c68a1ec4b8e49a4..f14d4b3fab446fe698f41e2e37c6274320611ccc 100644 (file)
@@ -597,6 +597,8 @@ static int synquacer_i2c_probe(struct platform_device *pdev)
        i2c->adapter = synquacer_i2c_ops;
        i2c_set_adapdata(&i2c->adapter, i2c);
        i2c->adapter.dev.parent = &pdev->dev;
+       i2c->adapter.dev.of_node = pdev->dev.of_node;
+       ACPI_COMPANION_SET(&i2c->adapter.dev, ACPI_COMPANION(&pdev->dev));
        i2c->adapter.nr = pdev->id;
        init_completion(&i2c->completion);