greybus: fix manifest parsing size bug
authorAlex Elder <elder@linaro.org>
Tue, 9 Sep 2014 18:55:09 +0000 (13:55 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 9 Sep 2014 22:16:12 +0000 (15:16 -0700)
commite82bef42fdacd3434bd58738545a98c791fd64d1
tree19495ff1a2c4c178ba1e0efc8cd4905373759ba6
parent57fc0a110405ba305b525bede8cdf2e1b00b69a0
greybus: fix manifest parsing size bug

The type-specific "create" routines that get called while parsing
the descriptor entries in the module manifest assume the size they
are provided is the size of their data portion only--not including
the descriptor header.

Compute this value in greybus_new_module(), and pass it to those
functions rather than the full descriptor size.  Move a few
declarations to the innermost block that uses them.

Signed-off-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
drivers/staging/greybus/core.c