From: Greg Kroah-Hartman Date: Fri, 3 Oct 2014 04:25:21 +0000 (-0700) Subject: greybus: operation: fix endian issue in the operation message header size field. X-Git-Tag: v4.9-rc1~119^2~378^2~21^2~2050 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=322543a335c9dc9393a7472ce0b53a428ab3decd;p=karo-tx-linux.git greybus: operation: fix endian issue in the operation message header size field. --- diff --git a/drivers/staging/greybus/operation.c b/drivers/staging/greybus/operation.c index b930d24ce552..fe2f1a7137e5 100644 --- a/drivers/staging/greybus/operation.c +++ b/drivers/staging/greybus/operation.c @@ -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 */