greybus: operation: fix endian issue in the operation message header size field.
authorGreg Kroah-Hartman <greg@kroah.com>
Fri, 3 Oct 2014 04:25:21 +0000 (21:25 -0700)
committerGreg Kroah-Hartman <greg@kroah.com>
Fri, 3 Oct 2014 04:25:21 +0000 (21:25 -0700)
drivers/staging/greybus/operation.c

index b930d24..fe2f1a7 100644 (file)
@@ -139,7 +139,7 @@ struct gb_operation *gb_operation_create(struct gb_connection *connection,
        operation->gbuf = gbuf;
        header = (struct gb_operation_msg_hdr *)&gbuf->transfer_buffer;
        header->id = 0;
-       header->size = size;
+       header->size = cpu_to_le16(size);
        operation->payload = (char *)header + sizeof(*header);
 
        operation->callback = NULL;     /* set at submit time */