Commit b08488be authored by Viresh Kumar's avatar Viresh Kumar Committed by Greg Kroah-Hartman

greybus: manifest: Allow bundles/connections list to be non-empty at manifest parsing

A connection and a bundle will be created for interfaces at the very
beginning for control protocol's functioning. And so the list of bundles
and connections for a interface will be non-empty by the time manifest
is parsed.

Currently we are firing a WARN when these lists are found to be
non-empty. Lets fix that to contain single bundle and connection for
control protocol.
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 3b6ecd6d
...@@ -208,9 +208,6 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle) ...@@ -208,9 +208,6 @@ static u32 gb_manifest_parse_cports(struct gb_bundle *bundle)
u8 bundle_id = bundle->id; u8 bundle_id = bundle->id;
u32 count = 0; u32 count = 0;
if (WARN_ON(!list_empty(&bundle->connections)))
return 0;
/* Set up all cport descriptors associated with this bundle */ /* Set up all cport descriptors associated with this bundle */
list_for_each_entry_safe(desc, next, &intf->manifest_descs, links) { list_for_each_entry_safe(desc, next, &intf->manifest_descs, links) {
struct greybus_descriptor_cport *desc_cport; struct greybus_descriptor_cport *desc_cport;
...@@ -263,9 +260,6 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf) ...@@ -263,9 +260,6 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf)
struct gb_bundle *bundle_next; struct gb_bundle *bundle_next;
u32 count = 0; u32 count = 0;
if (WARN_ON(!list_empty(&intf->bundles)))
return 0;
list_for_each_entry_safe(desc, next, &intf->manifest_descs, links) { list_for_each_entry_safe(desc, next, &intf->manifest_descs, links) {
struct greybus_descriptor_bundle *desc_bundle; struct greybus_descriptor_bundle *desc_bundle;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment