diff options
author | Vadim Bendebury <vbendeb@chromium.org> | 2016-11-25 12:22:32 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-11-28 20:53:43 -0800 |
commit | cfbdf9608614cafe561cbc2342b297cba2cd34e3 (patch) | |
tree | 43644b57eef1f5152b24f7ab3e6a4fc7c93b6588 /extra | |
parent | 0f23c61face868b93c59445a39f547bed8817e2c (diff) | |
download | chrome-ec-cfbdf9608614cafe561cbc2342b297cba2cd34e3.tar.gz |
usb_updater: use same endian conversion functions
This is just a clean up patch, unifying all cases where endian
conversions are used in the usb updater source code.
BRANCH=none
BUG=none
TEST=usb update of cr50 is still possible on gru (which uses the code
being changed).
Change-Id: I362e9762493854b4fdbb9ec15c2cb363003f258a
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/414443
Reviewed-by: Mary Ruthven <mruthven@chromium.org>
Diffstat (limited to 'extra')
-rw-r--r-- | extra/usb_updater/usb_updater.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/extra/usb_updater/usb_updater.c b/extra/usb_updater/usb_updater.c index 574ca9f890..03591cfe47 100644 --- a/extra/usb_updater/usb_updater.c +++ b/extra/usb_updater/usb_updater.c @@ -227,12 +227,12 @@ static int tpm_send_pkt(int fd, unsigned int digest, unsigned int addr, len = size + sizeof(struct upgrade_pkt); - out->tag = __cpu_to_be16(0x8001); - out->length = __cpu_to_be32(len); - out->ordinal = __cpu_to_be32(EXT_CMD); - out->subcmd = __cpu_to_be16(subcmd); + out->tag = htobe16(0x8001); + out->length = htobe32(len); + out->ordinal = htobe32(EXT_CMD); + out->subcmd = htobe16(subcmd); out->digest = digest; - out->address = __cpu_to_be32(addr); + out->address = htobe32(addr); memcpy(out->data, data, size); #ifdef DEBUG { |