summaryrefslogtreecommitdiff
path: root/drivers/staging/gdm72xx/usb_boot.c
diff options
context:
space:
mode:
authorBen Chan <benchan@chromium.org>2014-07-01 06:32:27 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-07-09 18:49:16 (GMT)
commita8a175d9fc2ddb513baf5f043c1e9de512f886f7 (patch)
tree6ad60b4b0527226717ed8090fea1444c719eded9 /drivers/staging/gdm72xx/usb_boot.c
parentbbd500d8cdb071e7964fc07ab988817d719e1578 (diff)
downloadlinux-a8a175d9fc2ddb513baf5f043c1e9de512f886f7.tar.xz
staging: gdm72xx: clean up endianness conversions
This patch cleans up the endianness conversions in the gdm72xx driver: - Directly use the generic byte-reordering macros for endianness conversion instead of some custom-defined macros. - Convert values on the constant side instead of the variable side when appropriate. - Add endianness annotations. Signed-off-by: Ben Chan <benchan@chromium.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/gdm72xx/usb_boot.c')
-rw-r--r--drivers/staging/gdm72xx/usb_boot.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/gdm72xx/usb_boot.c b/drivers/staging/gdm72xx/usb_boot.c
index d59bac8..3ccc447 100644
--- a/drivers/staging/gdm72xx/usb_boot.c
+++ b/drivers/staging/gdm72xx/usb_boot.c
@@ -36,8 +36,8 @@
#define FW_FS "ramdisk.jffs2"
struct dn_header {
- u32 magic_num;
- u32 file_size;
+ __be32 magic_num;
+ __be32 file_size;
};
struct img_header {
@@ -69,7 +69,7 @@ static void array_le32_to_cpu(u32 *arr, int num)
int i;
for (i = 0; i < num; i++, arr++)
- *arr = __le32_to_cpu(*arr);
+ le32_to_cpus(arr);
}
static u8 *tx_buf;
@@ -115,8 +115,8 @@ static int download_image(struct usb_device *usbdev,
u32 size;
size = ALIGN(img_len, DOWNLOAD_SIZE);
- h.magic_num = __cpu_to_be32(magic_num);
- h.file_size = __cpu_to_be32(size);
+ h.magic_num = cpu_to_be32(magic_num);
+ h.file_size = cpu_to_be32(size);
ret = gdm_wibro_send(usbdev, &h, sizeof(h));
if (ret < 0)