From 7e4c8d713539b608a11a38102a203a1a8acd345a Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Fri, 16 Oct 2015 16:54:18 -0700 Subject: [PATCH] greybus: protocol: 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 protocol code to use the bundle pointer instead of the connection pointer when printing out error messages. Signed-off-by: Greg Kroah-Hartman Reviewed-by: Viresh Kumar Reviewed-by: Alex Elder Reviewed-by: Johan Hovold --- drivers/staging/greybus/protocol.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/greybus/protocol.c b/drivers/staging/greybus/protocol.c index 889cff2a10c2..1790d1ac8513 100644 --- a/drivers/staging/greybus/protocol.c +++ b/drivers/staging/greybus/protocol.c @@ -165,19 +165,19 @@ int gb_protocol_get_version(struct gb_connection *connection) return retval; if (response.major > connection->protocol->major) { - dev_err(&connection->dev, - "unsupported major version (%hhu > %hhu)\n", - response.major, connection->protocol->major); + dev_err(&connection->bundle->dev, + "%d: unsupported major version (%hhu > %hhu)\n", + connection->intf_cport_id, response.major, + connection->protocol->major); return -ENOTSUPP; } connection->module_major = response.major; connection->module_minor = response.minor; - - dev_dbg(&connection->dev, "%s - %s (0x%02hhx) v%hhu.%hhu\n", __func__, - protocol->name, protocol->id, - response.major, response.minor); + dev_dbg(&connection->bundle->dev, + "%d: %s (0x%02hhx) v%hhu.%hhu\n", connection->intf_cport_id, + protocol->name, protocol->id, response.major, response.minor); return 0; } -- 2.39.5