diff --git a/drivers/staging/greybus/core.c b/drivers/staging/greybus/core.c index fc54ac9f5c91..05217c630ff7 100644 --- a/drivers/staging/greybus/core.c +++ b/drivers/staging/greybus/core.c @@ -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; diff --git a/drivers/staging/greybus/greybus_manifest.h b/drivers/staging/greybus/greybus_manifest.h index 2830d552f0e1..8ffeb172e4d5 100644 --- a/drivers/staging/greybus/greybus_manifest.h +++ b/drivers/staging/greybus/greybus_manifest.h @@ -63,7 +63,7 @@ struct greybus_descriptor_module { }; struct greybus_descriptor_string { - __le16 length; + __u8 length; __u8 id; __u8 string[0]; };