i2c: cros-ec-tunnel: Fix slave device enumeration

During adding of the adapter the slave device registration
use to fail as the acpi companion field was not populated.

Fixes: 9af1563a54 ("i2c: cros-ec-tunnel: Make the device acpi compatible")
Signed-off-by: Akshu Agrawal <akshu.agrawal@amd.com>
Acked-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
This commit is contained in:
Akshu Agrawal 2019-11-21 14:36:17 +05:30 committed by Wolfram Sang
parent ea6dd25dee
commit 8ff2d7ca4a
1 changed files with 1 additions and 0 deletions

View File

@ -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)