summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-01-19 12:51:19 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-19 12:17:13 -0800
commit357de006573f0dbbd5e214dd3f2fe808157ec530 (patch)
tree0c9ae4a33f2b2161497b771e885163a4339ec194 /drivers
parent47a2e6769e8194da5570eaed7fc43f5abec18809 (diff)
downloadop-kernel-dev-357de006573f0dbbd5e214dd3f2fe808157ec530.zip
op-kernel-dev-357de006573f0dbbd5e214dd3f2fe808157ec530.tar.gz
greybus: svc: store protocol version
Store the "negotiated" protocol version to use in the svc state struct instead of the connection struct. The generic concept of a connection version is going away in favour of bundle-class versions. Reviewed-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/greybus/svc.c8
-rw-r--r--drivers/staging/greybus/svc.h3
2 files changed, 7 insertions, 4 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index fcdee90..bc64f48 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -383,15 +383,15 @@ static int gb_svc_version_request(struct gb_operation *op)
return -ENOTSUPP;
}
- connection->module_major = request->major;
- connection->module_minor = request->minor;
+ svc->protocol_major = request->major;
+ svc->protocol_minor = request->minor;
if (!gb_operation_response_alloc(op, sizeof(*response), GFP_KERNEL))
return -ENOMEM;
response = op->response->payload;
- response->major = connection->module_major;
- response->minor = connection->module_minor;
+ response->major = svc->protocol_major;
+ response->minor = svc->protocol_minor;
return 0;
}
diff --git a/drivers/staging/greybus/svc.h b/drivers/staging/greybus/svc.h
index 8567615..4abc5ef 100644
--- a/drivers/staging/greybus/svc.h
+++ b/drivers/staging/greybus/svc.h
@@ -27,6 +27,9 @@ struct gb_svc {
u16 endo_id;
u8 ap_intf_id;
+
+ u8 protocol_major;
+ u8 protocol_minor;
};
#define to_gb_svc(d) container_of(d, struct gb_svc, d)
OpenPOWER on IntegriCloud