summaryrefslogtreecommitdiffstats
path: root/drivers/staging/greybus/manifest.c
diff options
context:
space:
mode:
authorSachin Pandhare <sachin.pandhare@linaro.org>2015-11-24 07:59:10 +0530
committerGreg Kroah-Hartman <gregkh@google.com>2015-11-23 19:23:47 -0800
commitfc25d9068e80659ea2b3a4516c63c523bdafc20b (patch)
tree5f85df5fb1fe5a5e62f99aa8122b0410409192d9 /drivers/staging/greybus/manifest.c
parentbfe2c99c1cd346b06a7d34274b9b826d40ab40a1 (diff)
downloadlinux-fc25d9068e80659ea2b3a4516c63c523bdafc20b.tar.bz2
greybus: manifest: simplify descriptor address calculation
This patch doesn't change any functionality. It just improves the readability of the code. Current code to get 'descriptors' pointer looks as if we are forcing the pointer type change. To simplify the address calculations, use 'descriptors' member directly from greybus_manifest structure. Signed-off-by: Sachin Pandhare <sachin.pandhare@linaro.org> Reviewed-by: Viresh Kumar <viresh.kumar@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.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/staging/greybus/manifest.c b/drivers/staging/greybus/manifest.c
index c80a849617d7..41d51579217f 100644
--- a/drivers/staging/greybus/manifest.c
+++ b/drivers/staging/greybus/manifest.c
@@ -475,7 +475,7 @@ bool gb_manifest_parse(struct gb_interface *intf, void *data, size_t size)
}
/* OK, find all the descriptors */
- desc = (struct greybus_descriptor *)(header + 1);
+ desc = manifest->descriptors;
size -= sizeof(*header);
while (size) {
int desc_size;