Commit ad14b9e9 authored by Viresh Kumar's avatar Viresh Kumar Committed by Johan Hovold

greybus: bundle: kill unnecessary forward declaration of routine

Move the function to an earlier place, to kill the unnecessary forward
declaration.
Reviewed-by: default avatarBryan O'Donoghue <bryan.odonoghue@linaro.org>
Reviewed-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJohan Hovold <johan@hovoldconsulting.com>
parent 505f16cc
...@@ -9,8 +9,6 @@ ...@@ -9,8 +9,6 @@
#include "greybus.h" #include "greybus.h"
static void gb_bundle_connections_exit(struct gb_bundle *bundle);
static ssize_t class_show(struct device *dev, struct device_attribute *attr, static ssize_t class_show(struct device *dev, struct device_attribute *attr,
char *buf) char *buf)
{ {
...@@ -197,6 +195,18 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id, ...@@ -197,6 +195,18 @@ struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
return bundle; return bundle;
} }
static void gb_bundle_connections_exit(struct gb_bundle *bundle)
{
struct gb_connection *connection;
struct gb_connection *next;
list_for_each_entry_safe(connection, next, &bundle->connections,
bundle_links) {
gb_connection_exit(connection);
gb_connection_destroy(connection);
}
}
/* /*
* Tear down a previously set up bundle. * Tear down a previously set up bundle.
*/ */
...@@ -224,15 +234,3 @@ struct gb_bundle *gb_bundle_find(struct gb_interface *intf, u8 bundle_id) ...@@ -224,15 +234,3 @@ struct gb_bundle *gb_bundle_find(struct gb_interface *intf, u8 bundle_id)
return bundle; return bundle;
} }
static void gb_bundle_connections_exit(struct gb_bundle *bundle)
{
struct gb_connection *connection;
struct gb_connection *next;
list_for_each_entry_safe(connection, next, &bundle->connections,
bundle_links) {
gb_connection_exit(connection);
gb_connection_destroy(connection);
}
}
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