Commit c01e16e3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

greybus: i2c: use the bundle struct device instead of the connector

We are removing struct device from the gb_connection structure in the
near future.  The gb_bundle structure's struct device should be used as
a replacement.

This patch moves the i2c driver to use the bundle pointer instead of the
connection pointer.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
parent c7eb46e4
...@@ -118,7 +118,7 @@ gb_i2c_operation_create(struct gb_connection *connection, ...@@ -118,7 +118,7 @@ gb_i2c_operation_create(struct gb_connection *connection,
u32 i; u32 i;
if (msg_count > (u32)U16_MAX) { if (msg_count > (u32)U16_MAX) {
dev_err(&connection->dev, "msg_count (%u) too big\n", dev_err(&connection->bundle->dev, "msg_count (%u) too big\n",
msg_count); msg_count);
return NULL; return NULL;
} }
...@@ -312,7 +312,7 @@ static int gb_i2c_connection_init(struct gb_connection *connection) ...@@ -312,7 +312,7 @@ static int gb_i2c_connection_init(struct gb_connection *connection)
adapter->timeout = gb_i2c_dev->timeout_msec * HZ / 1000; adapter->timeout = gb_i2c_dev->timeout_msec * HZ / 1000;
adapter->retries = gb_i2c_dev->retries; adapter->retries = gb_i2c_dev->retries;
adapter->dev.parent = &connection->dev; adapter->dev.parent = &connection->bundle->dev;
snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter"); snprintf(adapter->name, sizeof(adapter->name), "Greybus i2c adapter");
i2c_set_adapdata(adapter, gb_i2c_dev); 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