Commit cbd0fd7b authored by Matt Porter's avatar Matt Porter Committed by Greg Kroah-Hartman

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: default avatarMatt Porter <mporter@linaro.org>
Reviewed-by: default avatarAlex Elder <elder@linaro.org>
Signed-off-by: default avatarGreg Kroah-Hartman <greg@kroah.com>
parent 097724c2
...@@ -279,7 +279,7 @@ static int create_string(struct greybus_module *gmod, ...@@ -279,7 +279,7 @@ static int create_string(struct greybus_module *gmod,
return -EINVAL; return -EINVAL;
} }
string_size = le16_to_cpu(string->length); string_size = string->length;
gmod_string = kzalloc(sizeof(*gmod_string) + string_size + 1, GFP_KERNEL); gmod_string = kzalloc(sizeof(*gmod_string) + string_size + 1, GFP_KERNEL);
if (!gmod_string) if (!gmod_string)
return -ENOMEM; return -ENOMEM;
......
...@@ -63,7 +63,7 @@ struct greybus_descriptor_module { ...@@ -63,7 +63,7 @@ struct greybus_descriptor_module {
}; };
struct greybus_descriptor_string { struct greybus_descriptor_string {
__le16 length; __u8 length;
__u8 id; __u8 id;
__u8 string[0]; __u8 string[0];
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment