greybus: svc: preserve major/minor of protocol supported by SVC
authorViresh Kumar <viresh.kumar@linaro.org>
Tue, 11 Aug 2015 02:06:14 +0000 (07:36 +0530)
committerGreg Kroah-Hartman <gregkh@google.com>
Wed, 12 Aug 2015 02:34:34 +0000 (19:34 -0700)
These weren't preserved earlier, save them in the connection structure
instead of creating its own fields..

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

index 17ffb1353fb48a706493fc8279c27083035bff15..025b2bad94280b2687b9bc6a494142afe77da1c8 100644 (file)
@@ -11,8 +11,6 @@
 
 struct gb_svc {
        struct gb_connection    *connection;
-       u8                      version_major;
-       u8                      version_minor;
 };
 
 static struct ida greybus_svc_device_id_map;
@@ -163,6 +161,9 @@ static int gb_svc_version_request(struct gb_operation *op)
                return -ENOTSUPP;
        }
 
+       connection->module_major = version->major;
+       connection->module_minor = version->minor;
+
        if (!gb_operation_response_alloc(op, sizeof(*version), GFP_KERNEL)) {
                dev_err(dev, "%s: error allocating response\n",
                                __func__);