]> git.baikalelectronics.ru Git - kernel.git/commitdiff
i2c: xgene: Set ACPI_COMPANION_I2C
authorTin Huynh <tnhuynh@apm.com>
Wed, 17 May 2017 04:25:34 +0000 (11:25 +0700)
committerWolfram Sang <wsa@the-dreams.de>
Wed, 17 May 2017 07:21:06 +0000 (09:21 +0200)
With ACPI, i2c-core requires ACPI companion to be set in order for it
to create slave device.
This patch sets the ACPI companion accordingly.

Signed-off-by: Tin Huynh <tnhuynh@apm.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
drivers/i2c/busses/i2c-xgene-slimpro.c

index dbe7e44c9321279bbcd7b3f8d2006dbe1365e0b7..6ba6c83ca8f1bc9ee0c22bbb99e004e6bb50a77f 100644 (file)
@@ -416,6 +416,7 @@ static int xgene_slimpro_i2c_probe(struct platform_device *pdev)
        adapter->class = I2C_CLASS_HWMON;
        adapter->dev.parent = &pdev->dev;
        adapter->dev.of_node = pdev->dev.of_node;
+       ACPI_COMPANION_SET(&adapter->dev, ACPI_COMPANION(&pdev->dev));
        i2c_set_adapdata(adapter, ctx);
        rc = i2c_add_adapter(adapter);
        if (rc) {