Commit c1c36f31 authored by Al Viro's avatar Al Viro Committed by Mauro Carvalho Chehab

V4L/DVB (7967): bt8xx: unaligned access

Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 576904bb
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <linux/firmware.h> #include <linux/firmware.h>
#include <net/checksum.h> #include <net/checksum.h>
#include <asm/unaligned.h>
#include <asm/io.h> #include <asm/io.h>
#include "bttvp.h" #include "bttvp.h"
...@@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) ...@@ -3858,7 +3859,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
ee += i; ee += i;
/* found a valid descriptor */ /* found a valid descriptor */
type = be16_to_cpup((u16*)(ee+4)); type = get_unaligned_be16((__be16 *)(ee+4));
switch(type) { switch(type) {
/* 848 based */ /* 848 based */
...@@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256]) ...@@ -3918,7 +3919,7 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
btv->c.nr, type); btv->c.nr, type);
break; 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", printk(KERN_INFO "bttv%d: osprey eeprom: card=%d '%s' serial=%u\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment