1
0
Fork 0

greybus: update string descriptor length field to __u8 type to match spec

Greybus spec was updated to make the length field a single byte. Update
the type and remove endian handling of that field in the core.

Signed-off-by: Matt Porter <mporter@linaro.org>
Reviewed-by: Alex Elder <elder@linaro.org>
Signed-off-by: Greg Kroah-Hartman <greg@kroah.com>
hifive-unleashed-5.1
Matt Porter 2014-09-26 20:49:51 -05:00 committed by Greg Kroah-Hartman
parent 097724c2fb
commit cbd0fd7b9b
2 changed files with 2 additions and 2 deletions

View File

@ -279,7 +279,7 @@ static int create_string(struct greybus_module *gmod,
return -EINVAL;
}
string_size = le16_to_cpu(string->length);
string_size = string->length;
gmod_string = kzalloc(sizeof(*gmod_string) + string_size + 1, GFP_KERNEL);
if (!gmod_string)
return -ENOMEM;

View File

@ -63,7 +63,7 @@ struct greybus_descriptor_module {
};
struct greybus_descriptor_string {
__le16 length;
__u8 length;
__u8 id;
__u8 string[0];
};