From cbd0fd7b9b6fd5c6d9f13f021a17a072e9d33147 Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Fri, 26 Sep 2014 20:49:51 -0500 Subject: [PATCH] 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 Reviewed-by: Alex Elder Signed-off-by: Greg Kroah-Hartman --- drivers/staging/greybus/core.c | 2 +- drivers/staging/greybus/greybus_manifest.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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]; };