tools: ffs-aio-example: fix header values endianess
authorRobert Baldyga <r.baldyga@samsung.com>
Wed, 25 Jun 2014 06:26:47 +0000 (08:26 +0200)
committerFelipe Balbi <balbi@ti.com>
Mon, 30 Jun 2014 17:53:27 +0000 (12:53 -0500)
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 <mina86@mina86.com>
Signed-off-by: Robert Baldyga <r.baldyga@samsung.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
tools/usb/ffs-aio-example/multibuff/device_app/aio_multibuff.c
tools/usb/ffs-aio-example/simple/device_app/aio_simple.c

index 87216a0c4a8b883b2ce9a1254b2c1ad9e55edc09..a349a872781b4cc28149c5c05e51fc9853027475 100644 (file)
@@ -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 = {
index f558664a33176b6b325294636c7c89ee92042f15..28c22cb51249b21b0f5f3adf453e2f840647f810 100644 (file)
@@ -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 = {