From: Viresh Kumar Date: Tue, 11 Aug 2015 02:05:58 +0000 (+0530) Subject: greybus: connection: Save major/minor supported by module X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d653f4b19163aa9f3a8046bd6e895b8615856d11;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git 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 --- 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);