greybus: connection: Save major/minor supported by module
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Aug 2015 02:05:58 +0000 (07:35 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 00:53:43 +0000 (17:53 -0700)
Save major/minor number supported by the module inside connection
structure, as this can be used later.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
drivers/staging/greybus/connection.h
drivers/staging/greybus/protocol.c

index f02b9d9fb0845223b378dc5bc3f5b977983951bc..0dbbc202e9539087bb1e0b0630bfda496755f1aa 100644 (file)
@@ -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;
index 06b4841173ce1c0693bda65130af1c6a77ea13d7..ba80f552fa31a1be0bcb0d743a8a88ade0c46558 100644 (file)
@@ -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);