]> git.karo-electronics.de Git - karo-tx-linux.git/commit
greybus: bundle: fix gb_bundle_destroy()
authorAlex Elder <elder@linaro.org>
Fri, 12 Jun 2015 15:21:11 +0000 (10:21 -0500)
committerGreg Kroah-Hartman <gregkh@google.com>
Fri, 12 Jun 2015 19:14:24 +0000 (12:14 -0700)
commitfe53b45ca8143e7f1073ff31d7c4cfb4e92dc824
treef02282fc18323472b0c381fc2024fecbb716bb4e
parentbc942083585da78a5287089023aebcc8952c21f4
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>
drivers/staging/greybus/bundle.c
drivers/staging/greybus/bundle.h
drivers/staging/greybus/interface.c