summaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAl Viro <viro@ftp.linux.org.uk>2008-05-21 05:32:21 +0200
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-06-05 11:35:52 +0200
commitc1c36f3128c89aa96f01cbf6d40b0cd77a8bc45e (patch)
tree5f58ef8eff3293dc08152a7466bb0dedeeb3fe76 /drivers/media
parentV4L/DVB (7966): cx18: direct dereferencing of iomem (diff)
downloadlinux-c1c36f3128c89aa96f01cbf6d40b0cd77a8bc45e.tar.xz
linux-c1c36f3128c89aa96f01cbf6d40b0cd77a8bc45e.zip
V4L/DVB (7967): bt8xx: unaligned access
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/bt8xx/bttv-cards.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/bt8xx/bttv-cards.c b/drivers/media/video/bt8xx/bttv-cards.c
index f20a01cfc73e..8ef0424c26c4 100644
--- a/drivers/media/video/bt8xx/bttv-cards.c
+++ b/drivers/media/video/bt8xx/bttv-cards.c
@@ -34,6 +34,7 @@
#include <linux/firmware.h>
#include <net/checksum.h>
+#include <asm/unaligned.h>
#include <asm/io.h>
#include "bttvp.h"
@@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
ee += i;
/* found a valid descriptor */
- type = be16_to_cpup((u16*)(ee+4));
+ type = get_unaligned_be16((__be16 *)(ee+4));
switch(type) {
/* 848 based */
@@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
btv->c.nr, type);
break;
}
- serial = be32_to_cpup((u32*)(ee+6));
+ serial = get_unaligned_be32((__be32 *)(ee+6));
}
printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",