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>
This commit is contained in:
parent
097724c2fb
commit
cbd0fd7b9b
|
@ -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 {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct greybus_descriptor_string {
|
struct greybus_descriptor_string {
|
||||||
__le16 length;
|
__u8 length;
|
||||||
__u8 id;
|
__u8 id;
|
||||||
__u8 string[0];
|
__u8 string[0];
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue