From: Akshu Agrawal Date: Thu, 21 Nov 2019 09:06:17 +0000 (+0530) Subject: i2c: cros-ec-tunnel: Fix slave device enumeration X-Git-Tag: v5.5.4~21 X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=2139ad8d3c74aa6cd3f814231820bc847c993828;p=users%2Fdwmw2%2Flinux.git i2c: cros-ec-tunnel: Fix slave device enumeration commit 8ff2d7ca4a55dfabf12e876369835bd024eb4621 upstream. During adding of the adapter the slave device registration use to fail as the acpi companion field was not populated. Fixes: 9af1563a5486 ("i2c: cros-ec-tunnel: Make the device acpi compatible") Signed-off-by: Akshu Agrawal Acked-by: Raul E Rangel Reviewed-by: Enric Balletbo i Serra Signed-off-by: Wolfram Sang Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/i2c/busses/i2c-cros-ec-tunnel.c b/drivers/i2c/busses/i2c-cros-ec-tunnel.c index 958161c71985d..8a2db3ac3b3c7 100644 --- a/drivers/i2c/busses/i2c-cros-ec-tunnel.c +++ b/drivers/i2c/busses/i2c-cros-ec-tunnel.c @@ -273,6 +273,7 @@ static int ec_i2c_probe(struct platform_device *pdev) bus->adap.dev.parent = &pdev->dev; bus->adap.dev.of_node = pdev->dev.of_node; bus->adap.retries = I2C_MAX_RETRIES; + ACPI_COMPANION_SET(&bus->adap.dev, ACPI_COMPANION(&pdev->dev)); err = i2c_add_adapter(&bus->adap); if (err)