From: Greg Kroah-Hartman Date: Fri, 24 Oct 2014 10:33:59 +0000 (+0800) Subject: greybus: i2c: point to the proper parent device X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~1961 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3e6d5f3a6103b20c70f4d75b90d2c798045cc7ef;p=karo-tx-linux.git 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: Greg Kroah-Hartman --- diff --git a/drivers/staging/greybus/i2c-gb.c b/drivers/staging/greybus/i2c-gb.c index e1a0ed9dc6f2..9ecfd795ea84 100644 --- a/drivers/staging/greybus/i2c-gb.c +++ b/drivers/staging/greybus/i2c-gb.c @@ -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);