From d653f4b19163aa9f3a8046bd6e895b8615856d11 Mon Sep 17 00:00:00 2001 From: Viresh Kumar Date: Tue, 11 Aug 2015 07:35:58 +0530 Subject: [PATCH] greybus: connection: Save major/minor supported by module Save major/minor number supported by the module inside connection structure, as this can be used later. Signed-off-by: Viresh Kumar Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/connection.h | 2 ++ drivers/staging/greybus/protocol.c | 3 +++ 2 files changed, 5 insertions(+) diff --git a/drivers/staging/greybus/connection.h b/drivers/staging/greybus/connection.h index f02b9d9fb084..0dbbc202e953 100644 --- a/drivers/staging/greybus/connection.h +++ b/drivers/staging/greybus/connection.h @@ -34,6 +34,8 @@ struct gb_connection { u8 protocol_id; u8 major; u8 minor; + u8 module_major; + u8 module_minor; spinlock_t lock; enum gb_connection_state state; diff --git a/drivers/staging/greybus/protocol.c b/drivers/staging/greybus/protocol.c index 06b4841173ce..ba80f552fa31 100644 --- a/drivers/staging/greybus/protocol.c +++ b/drivers/staging/greybus/protocol.c @@ -182,6 +182,9 @@ int gb_protocol_get_version(struct gb_connection *connection, int type, return -ENOTSUPP; } + connection->module_major = response->major; + connection->module_minor = response->minor; + dev_dbg(&connection->dev, "version_major = %u version_minor = %u\n", response->major, response->minor);