diff options
author | Johan Hovold <johan@hovoldconsulting.com> | 2015-11-25 15:59:11 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-11-25 15:34:19 -0800 |
commit | 2566fae6a5eb29e52502a38fd816c6e994547625 (patch) | |
tree | 1a172ef387861bcbc80f7374a64e6714b4a5c6e1 /drivers/staging/greybus/manifest.c | |
parent | e4048006fd3823760d85057549bf609d3ed2e4c8 (diff) |
greybus: connection: clean up connection-creation interface
Clean up the connection-creation interface by clearly separating our two
types of connections: static and dynamic.
Add two convenience functions for creating static and dynamic connections.
A static connection is a pre-setup connection that is defined by a host
device and a host-device cport id. Specifically, the remote interface or
cport id need not be known. The SVC connection is a static connection.
A dynamic connection is defined by a host device and a remote interface
and cport id. This is our normal connections where the host-device cport
is (generally) allocated dynamically.
Note that the new generic interface is marked static, but can be
exported later to allow dynamic connections to be created also from
fixed host-device cports (e.g. for CSI).
Also note that a connection of either type is uniquely identified by its
host-device and host-device cport id once created.
Signed-off-by: Johan Hovold <johan@hovoldconsulting.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/manifest.c')
-rw-r--r-- | drivers/staging/greybus/manifest.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index 41d51579217f..9252bf46bcc4 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -251,7 +251,8 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle) goto print_error_exit; } - if (!gb_connection_create(bundle, cport_id, protocol_id)) + if (!gb_connection_create_dynamic(intf, bundle, cport_id, + protocol_id)) goto exit; release_descriptor: |