]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
greybus: update string descriptor length field to __u8 type to match spec
authorMatt Porter <mporter@linaro.org>
Sat, 27 Sep 2014 01:49:51 +0000 (20:49 -0500)
committerGreg Kroah-Hartman <greg@kroah.com>
Tue, 30 Sep 2014 00:57:33 +0000 (17:57 -0700)
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>
drivers/staging/greybus/core.c
drivers/staging/greybus/greybus_manifest.h

index fc54ac9f5c9152c2759b117915dfb77f5da5d647..05217c630ff7470aef640868a633775a15a10e1d 100644 (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;
index 2830d552f0e17c5f58072a2a8a30b17ea4174a3a..8ffeb172e4d5b9f21261d7e80eb5d577a5e32966 100644 (file)
@@ -63,7 +63,7 @@ struct greybus_descriptor_module {
 };
 
 struct greybus_descriptor_string {
-       __le16  length;
+       __u8    length;
        __u8    id;
        __u8    string[0];
 };