diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-21 00:32:41 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2008-05-21 00:32:41 +0000 |
commit | 8a60d4bcdc0249852620b847552a86d0b49b0dc6 (patch) | |
tree | 6736e7f9394533a784100035e897511eb7878c78 /linux/drivers/media | |
parent | a021994f78699accd2ed31c74ce714f6756e55e6 (diff) | |
download | mediapointer-dvb-s2-8a60d4bcdc0249852620b847552a86d0b49b0dc6.tar.gz mediapointer-dvb-s2-8a60d4bcdc0249852620b847552a86d0b49b0dc6.tar.bz2 |
m920x: unaligned access
From: Al Viro <viro@ftp.linux.org.uk>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/m920x.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/m920x.c b/linux/drivers/media/dvb/dvb-usb/m920x.c index 7597c4b78..5a7766fab 100644 --- a/linux/drivers/media/dvb/dvb-usb/m920x.c +++ b/linux/drivers/media/dvb/dvb-usb/m920x.c @@ -16,6 +16,7 @@ #include "qt1010.h" #include "tda1004x.h" #include "tda827x.h" +#include <asm/unaligned.h> /* debug */ static int dvb_usb_m920x_debug; @@ -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) { |