summaryrefslogtreecommitdiff
path: root/drivers/staging/greybus/bundle.h
diff options
context:
space:
mode:
authorAlex Elder <elder@linaro.org>2015-06-12 18:21:11 +0300
committerGreg Kroah-Hartman <gregkh@google.com>2015-06-12 22:14:24 +0300
commitfe53b45ca8143e7f1073ff31d7c4cfb4e92dc824 (patch)
treef02282fc18323472b0c381fc2024fecbb716bb4e /drivers/staging/greybus/bundle.h
parentbc942083585da78a5287089023aebcc8952c21f4 (diff)
downloadlinux-fe53b45ca8143e7f1073ff31d7c4cfb4e92dc824.tar.xz
greybus: bundle: fix gb_bundle_destroy()
Currently gb_bundle_destroy() takes an interface as an argument, and really doesn't do what a function by that name should do. What it now does is delete all bundles associated with a given interface. What it should do is destroy a single bundle. Move the looping logic out of gb_bundle_destroy() and into its caller, gb_interface_destroy(). Pass each bundle in an interface to gb_bundle_destroy(), which will do what's required to destroy a single bundle (including removing it from its interface's bundle list under protection of the lock). Signed-off-by: Alex Elder <elder@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/bundle.h')
-rw-r--r--drivers/staging/greybus/bundle.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/bundle.h b/drivers/staging/greybus/bundle.h
index 5c12c72ddcec..887883dabfc0 100644
--- a/drivers/staging/greybus/bundle.h
+++ b/drivers/staging/greybus/bundle.h
@@ -31,7 +31,7 @@ struct gb_bundle {
/* Greybus "private" definitions" */
struct gb_bundle *gb_bundle_create(struct gb_interface *intf, u8 bundle_id,
u8 class);
-void gb_bundle_destroy(struct gb_interface *intf);
+void gb_bundle_destroy(struct gb_bundle *bundle);
int gb_bundle_init(struct gb_bundle *bundle, u8 device_id);
int gb_bundles_init(struct gb_interface *intf, u8 device_id);