summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/connection.c
diff options
context:
space:
mode:
authorViresh Kumar <viresh.kumar@linaro.org>2015-08-31 17:21:09 +0530
committerJohan Hovold <johan@hovoldconsulting.com>2015-09-03 14:36:31 +0200
commit630096899120321791f0ca6fea7ad7f9bd572e20 (patch)
treef0ff164db1945abb51b06b5e0e4510a4183d6bc8 /drivers/staging/greybus/connection.c
parentad14b9e9ec4973416a911a5d3c59caedc048a279 (diff)
downloadlinux-stable-630096899120321791f0ca6fea7ad7f9bd572e20.tar.gz
linux-stable-630096899120321791f0ca6fea7ad7f9bd572e20.tar.bz2
linux-stable-630096899120321791f0ca6fea7ad7f9bd572e20.zip
greybus: connection: staticize gb_connection_init()
Its not used by external users, mark it static. This required some shuffling of the code. Reviewed-by: Bryan O'Donoghue <bryan.odonoghue@linaro.org> Reviewed-by: Johan Hovold <johan@hovoldconsulting.com> Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r--drivers/staging/greybus/connection.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c
index 286e7da3f275..62cbeb304616 100644
--- a/drivers/staging/greybus/connection.c
+++ b/drivers/staging/greybus/connection.c
@@ -163,31 +163,6 @@ int svc_update_connection(struct gb_interface *intf,
return 0;
}
-void gb_connection_bind_protocol(struct gb_connection *connection)
-{
- struct gb_protocol *protocol;
-
- /* If we already have a protocol bound here, just return */
- if (connection->protocol)
- return;
-
- protocol = gb_protocol_get(connection->protocol_id,
- connection->major,
- connection->minor);
- if (!protocol)
- return;
- connection->protocol = protocol;
-
- /*
- * If we have a valid device_id for the interface block, then we have an
- * active device, so bring up the connection at the same time.
- */
- if ((!connection->bundle &&
- connection->hd_cport_id == GB_SVC_CPORT_ID) ||
- connection->bundle->intf->device_id != GB_DEVICE_ID_BAD)
- gb_connection_init(connection);
-}
-
/*
* Set up a Greybus connection, representing the bidirectional link
* between a CPort on a (local) Greybus host device and a CPort on
@@ -391,7 +366,7 @@ static void gb_connection_disconnected(struct gb_connection *connection)
"Failed to disconnect CPort-%d (%d)\n", cport_id, ret);
}
-int gb_connection_init(struct gb_connection *connection)
+static int gb_connection_init(struct gb_connection *connection)
{
int cport_id = connection->intf_cport_id;
int ret;
@@ -480,3 +455,28 @@ void gb_hd_connections_exit(struct greybus_host_device *hd)
gb_connection_destroy(connection);
}
}
+
+void gb_connection_bind_protocol(struct gb_connection *connection)
+{
+ struct gb_protocol *protocol;
+
+ /* If we already have a protocol bound here, just return */
+ if (connection->protocol)
+ return;
+
+ protocol = gb_protocol_get(connection->protocol_id,
+ connection->major,
+ connection->minor);
+ if (!protocol)
+ return;
+ connection->protocol = protocol;
+
+ /*
+ * If we have a valid device_id for the interface block, then we have an
+ * active device, so bring up the connection at the same time.
+ */
+ if ((!connection->bundle &&
+ connection->hd_cport_id == GB_SVC_CPORT_ID) ||
+ connection->bundle->intf->device_id != GB_DEVICE_ID_BAD)
+ gb_connection_init(connection);
+}