Skip to content

Commit

Permalink
V4L/DVB (7969): m920x: unaligned access
Browse files Browse the repository at this point in the history
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Al Viro authored and Mauro Carvalho Chehab committed Jun 5, 2008
1 parent 581a7f1 commit fa9c13a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions drivers/media/dvb/dvb-usb/m920x.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "qt1010.h"
#include "tda1004x.h"
#include "tda827x.h"
#include <asm/unaligned.h>

/* debug */
static int dvb_usb_m920x_debug;
Expand Down Expand Up @@ -347,13 +348,13 @@ static int m920x_firmware_download(struct usb_device *udev, const struct firmwar

for (pass = 0; pass < 2; pass++) {
for (i = 0; i + (sizeof(u16) * 3) < fw->size;) {
value = le16_to_cpu(*(u16 *)(fw->data + i));
value = get_unaligned_le16(fw->data + i);
i += sizeof(u16);

index = le16_to_cpu(*(u16 *)(fw->data + i));
index = get_unaligned_le16(fw->data + i);
i += sizeof(u16);

size = le16_to_cpu(*(u16 *)(fw->data + i));
size = get_unaligned_le16(fw->data + i);
i += sizeof(u16);

if (pass == 1) {
Expand Down

0 comments on commit fa9c13a

Please sign in to comment.