summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/i2c.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@google.com>2015-10-14 11:18:32 -0700
committerGreg Kroah-Hartman <gregkh@google.com>2015-10-15 09:19:15 -0700
commitc01e16e3cb120938db87af91248e91f3552a1b73 (patch)
tree37de19f9f9cfc46599e2a2d864a7ca63b2bb855e /drivers/staging/greybus/i2c.c
parentc7eb46e459f2a05fa52656ae9d767aa498482ecf (diff)
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: Greg Kroah-Hartman <gregkh@google.com> Reviewed-by: Alex Elder <elder@linaro.org>
Diffstat (limited to 'drivers/staging/greybus/i2c.c')
-rw-r--r--drivers/staging/greybus/i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/greybus/i2c.c b/drivers/staging/greybus/i2c.c
index bf6d11b36b83..5a5af36570c8 100644
--- a/drivers/staging/greybus/i2c.c
+++ b/drivers/staging/greybus/i2c.c
@@ -118,7 +118,7 @@ gb_i2c_operation_create(struct gb_connection *connection,
u32 i;
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);
return NULL;
}
@@ -312,7 +312,7 @@ static int gb_i2c_connection_init(struct gb_connection *connection)
adapter->timeout = gb_i2c_dev->timeout_msec * HZ / 1000;
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");
i2c_set_adapdata(adapter, gb_i2c_dev);