diff options
author | Viresh Kumar <viresh.kumar@linaro.org> | 2015-07-01 12:13:58 +0530 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-07-01 16:38:42 -0700 |
commit | c3add7883c70b625b99c37ca89e6ec8733037ce3 (patch) | |
tree | f5fe6f2f17ffdd6f482b6c8c5204ac69f37c7ab0 /drivers/staging/greybus/connection.c | |
parent | 7e9017d482a2678ed32e7f60e6bfea10bab2dfa1 (diff) | |
download | linux-stable-c3add7883c70b625b99c37ca89e6ec8733037ce3.tar.gz linux-stable-c3add7883c70b625b99c37ca89e6ec8733037ce3.tar.bz2 linux-stable-c3add7883c70b625b99c37ca89e6ec8733037ce3.zip |
greybus: interface: device_id belongs to the interface
While introducing bundles, the device_id also got moved to the bundle,
whereas it identifies an interface block to the AP.
Move it back to interface instead of bundle.
Calls to gb_bundle(s)_init() are dropped as connections will be
initialized while they are created now, as device_id will be valid.
Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/connection.c')
-rw-r--r-- | drivers/staging/greybus/connection.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/greybus/connection.c b/drivers/staging/greybus/connection.c index 85b2a3370744..2e306d13ac28 100644 --- a/drivers/staging/greybus/connection.c +++ b/drivers/staging/greybus/connection.c @@ -102,7 +102,7 @@ struct device_type greybus_connection_type = { void gb_connection_bind_protocol(struct gb_connection *connection) { - struct gb_bundle *bundle; + struct gb_interface *intf; struct gb_protocol *protocol; /* If we already have a protocol bound here, just return */ @@ -117,11 +117,11 @@ void gb_connection_bind_protocol(struct gb_connection *connection) connection->protocol = protocol; /* - * If we have a valid device_id for the bundle, then we have an active - * device, so bring up the connection at the same time. + * 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. * */ - bundle = connection->bundle; - if (bundle->device_id != GB_DEVICE_ID_BAD) + intf = connection->bundle->intf; + if (intf->device_id != GB_DEVICE_ID_BAD) gb_connection_init(connection); } |