carlu: add missing endian conversion
authorChristian Lamparter <chunkeey@googlemail.com>
Fri, 15 Oct 2010 21:35:57 +0000 (23:35 +0200)
committerChristian Lamparter <chunkeey@googlemail.com>
Fri, 15 Oct 2010 21:35:57 +0000 (23:35 +0200)
Signed-off-by: Christian Lamparter <chunkeey@googlemail.com>
tools/carlu/src/cmd.c

index 56b9f8b7c956d7b79773abddf9efa7fe528c467f..81702b3fd94740e8275b29da88b23b7bcf42563c 100644 (file)
@@ -120,7 +120,7 @@ int carlu_cmd_write_mem(struct carlu *ar, const uint32_t addr,
                        const uint32_t val)
 {
        int err;
-       __le32 msg, block[2] = { addr, val };
+       __le32 msg, block[2] = { cpu_to_le32(addr), cpu_to_le32(val) };
 
        err = carlusb_cmd(ar, CARL9170_CMD_WREG,
                          (void *) &block, sizeof(block),