]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
greybus: i2c: point to the proper parent device
authorGreg Kroah-Hartman <greg@kroah.com>
Fri, 24 Oct 2014 10:33:59 +0000 (18:33 +0800)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 24 Oct 2014 10:36:24 +0000 (18:36 +0800)
Use the connection, not the host controller, as the parent device of the
i2c device.

Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/i2c-gb.c

index e1a0ed9dc6f2f1c7a919ee7c27e6d92be6e82f2e..9ecfd795ea8467c3e21f2955d5c1703b0fc2b2d8 100644 (file)
@@ -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);