summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/svc.c
diff options
context:
space:
mode:
authorJohan Hovold <johan@hovoldconsulting.com>2016-01-19 12:51:15 +0100
committerGreg Kroah-Hartman <gregkh@google.com>2016-01-19 12:17:13 -0800
commit84427943d2da5f55d5cc83d83ba2a75c2079d1dd (patch)
treecc7cd788bfa50bf75ac86f185508eb31a429dbb4 /drivers/staging/greybus/svc.c
parente217ae762bccb0ba0109887cefec3e20e5549a48 (diff)
greybus: svc: drop legacy-protocol dependency
Drop dependency on the legacy protocol abstraction. Remove the now unused and last legacy-protocol flag GB_PROTOCOL_SKIP_VERSION along with the protocol-flag feature. 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/staging/greybus/svc.c')
-rw-r--r--drivers/staging/greybus/svc.c35
1 files changed, 4 insertions, 31 deletions
diff --git a/drivers/staging/greybus/svc.c b/drivers/staging/greybus/svc.c
index 245cf4d43570..fcdee900a6ab 100644
--- a/drivers/staging/greybus/svc.c
+++ b/drivers/staging/greybus/svc.c
@@ -690,10 +690,11 @@ static int gb_svc_intf_reset_recv(struct gb_operation *op)
return 0;
}
-static int gb_svc_request_recv(u8 type, struct gb_operation *op)
+static int gb_svc_request_handler(struct gb_operation *op)
{
struct gb_connection *connection = op->connection;
struct gb_svc *svc = connection->private;
+ u8 type = op->type;
int ret = 0;
/*
@@ -815,7 +816,7 @@ int gb_svc_add(struct gb_svc *svc)
* is added from the connection request handler when enough
* information has been received.
*/
- ret = gb_connection_legacy_init(svc->connection);
+ ret = gb_connection_enable(svc->connection, gb_svc_request_handler);
if (ret)
return ret;
@@ -830,7 +831,7 @@ void gb_svc_del(struct gb_svc *svc)
if (device_is_registered(&svc->dev))
device_del(&svc->dev);
- gb_connection_legacy_exit(svc->connection);
+ gb_connection_disable(svc->connection);
flush_workqueue(svc->wq);
}
@@ -839,31 +840,3 @@ void gb_svc_put(struct gb_svc *svc)
{
put_device(&svc->dev);
}
-
-static int gb_svc_connection_init(struct gb_connection *connection)
-{
- struct gb_svc *svc = connection->private;
-
- dev_dbg(&svc->dev, "%s\n", __func__);
-
- return 0;
-}
-
-static void gb_svc_connection_exit(struct gb_connection *connection)
-{
- struct gb_svc *svc = connection->private;
-
- dev_dbg(&svc->dev, "%s\n", __func__);
-}
-
-static struct gb_protocol svc_protocol = {
- .name = "svc",
- .id = GREYBUS_PROTOCOL_SVC,
- .major = GB_SVC_VERSION_MAJOR,
- .minor = GB_SVC_VERSION_MINOR,
- .connection_init = gb_svc_connection_init,
- .connection_exit = gb_svc_connection_exit,
- .request_recv = gb_svc_request_recv,
- .flags = GB_PROTOCOL_SKIP_VERSION,
-};
-gb_builtin_protocol_driver(svc_protocol);