Commit 3e6d5f3a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: i2c: point to the proper parent device

Use the connection, not the host controller, as the parent device of the
i2c device.
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 44dd970b
......@@ -496,8 +496,7 @@ int gb_i2c_device_init(struct gb_connection *connection)
adapter->timeout = gb_i2c_dev->timeout_msec * HZ / 1000;
adapter->retries = gb_i2c_dev->retries;
/* XXX I think this parent device is wrong, but it uses existing code */
adapter->dev.parent = &connection->interface->gmod->dev;
adapter->dev.parent = &connection->dev;
snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter");
i2c_set_adapdata(adapter, gb_i2c_dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment