From: Robert Baldyga Date: Wed, 25 Jun 2014 06:26:47 +0000 (+0200) Subject: tools: ffs-aio-example: fix header values endianess X-Git-Tag: Ubuntu-5.2.0-15.16~13063^2~18^2~55 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=d2999e1b10fb740371a896b33fa1e6d89669ffba;p=mirror_ubuntu-eoan-kernel.git tools: ffs-aio-example: fix header values endianess We wrap numeric values of fs_count and hs_count fields in htole32, because they should be in little-endian format. Acked-by: Michal Nazarewicz Signed-off-by: Robert Baldyga Signed-off-by: Felipe Balbi --- diff --git a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c index 87216a0c4a8b..a349a872781b 100644 --- a/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c +++ b/tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c @@ -37,8 +37,8 @@ static const struct { .header = { .magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC), .length = htole32(sizeof(descriptors)), - .fs_count = 3, - .hs_count = 3, + .fs_count = htole32(3), + .hs_count = htole32(3), }, .fs_descs = { .intf = { diff --git a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c index f558664a3317..28c22cb51249 100644 --- a/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c +++ b/tools/usb/ffs-aio-example/simple/device_app/aio_simple.c @@ -35,8 +35,8 @@ static const struct { .header = { .magic = htole32(FUNCTIONFS_DESCRIPTORS_MAGIC), .length = htole32(sizeof(descriptors)), - .fs_count = 3, - .hs_count = 3, + .fs_count = htole32(3), + .hs_count = htole32(3), }, .fs_descs = { .intf = {