diff options
author | Alex Elder <elder@linaro.org> | 2015-06-09 17:42:54 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@google.com> | 2015-06-10 10:38:23 -0700 |
commit | c46839d1cc418aad43c66344888cd266b689acf9 (patch) | |
tree | 8a6088c9dbdb53ebfbccda0123316133f040c24c /drivers/staging/greybus/manifest.c | |
parent | d393c98f11a8a3355387d52386c885bc89970176 (diff) | |
download | linux-c46839d1cc418aad43c66344888cd266b689acf9.tar.bz2 |
greybus: manifest: use bundle's embedded interface pointer
An initialized bundle structure contains a pointer to its
interface. Because of this there's no need to provide
the interface pointer to gb_manifest_parse_cports(). This
also precludes the possibility of passing a bad interface
pointer.
Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Diffstat (limited to 'drivers/staging/greybus/manifest.c')
-rw-r--r-- | drivers/staging/greybus/manifest.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c index b937ddecbe41..d20cd80e6cdd 100644 --- a/drivers/staging/greybus/manifest.c +++ b/drivers/staging/greybus/manifest.c @@ -198,9 +198,9 @@ static char *gb_string_get(struct gb_interface *intf, u8 string_id) * them. Returns the number of cports set up for the bundle, or 0 * if there is an error. */ -static u32 gb_manifest_parse_cports(struct gb_interface *intf, - struct gb_bundle *bundle) +static u32 gb_manifest_parse_cports(struct gb_bundle *bundle) { + struct gb_interface *intf = bundle->intf; u32 count = 0; while (true) { @@ -270,7 +270,7 @@ static u32 gb_manifest_parse_bundles(struct gb_interface *intf) return 0; /* Error */ /* Now go set up this bundle's functions and cports */ - if (!gb_manifest_parse_cports(intf, bundle)) + if (!gb_manifest_parse_cports(bundle)) return 0; /* Error parsing cports */ count++; |