summaryrefslogtreecommitdiff
path: root/drivers/media/usb/em28xx/em28xx.h
diff options
context:
space:
mode:
authorFrank Schaefer <fschaefer.oss@googlemail.com>2013-03-03 18:37:38 (GMT)
committerMauro Carvalho Chehab <mchehab@redhat.com>2013-03-04 18:53:54 (GMT)
commit0c28dcc054ecbcd16e197bd9bf9b394cc1f691c5 (patch)
tree98bd83a09396675cd9d17bb77c59c8eac0e629c5 /drivers/media/usb/em28xx/em28xx.h
parentf55eacbe744f696fa5ff48fe4fdc0f00edc08619 (diff)
downloadlinux-fsl-qoriq-0c28dcc054ecbcd16e197bd9bf9b394cc1f691c5.tar.xz
[media] em28xx: fix eeprom data endianess
The data is stored as little endian in the eeprom. Hence the correct data types should be used and the data should be converted to the machine endianess before using it. The eeprom id (key) also isn't a 32 bit value but 4 separate bytes instead. [mchehab@redhat.com: Fix CodingStyle] Signed-off-by: Frank Schäfer <fschaefer.oss@googlemail.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/em28xx/em28xx.h')
-rw-r--r--drivers/media/usb/em28xx/em28xx.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/media/usb/em28xx/em28xx.h b/drivers/media/usb/em28xx/em28xx.h
index 4160a2a..90266a1 100644
--- a/drivers/media/usb/em28xx/em28xx.h
+++ b/drivers/media/usb/em28xx/em28xx.h
@@ -405,15 +405,15 @@ struct em28xx_board {
};
struct em28xx_eeprom {
- u32 id; /* 0x9567eb1a */
- u16 vendor_ID;
- u16 product_ID;
+ u8 id[4]; /* 1a eb 67 95 */
+ __le16 vendor_ID;
+ __le16 product_ID;
- u16 chip_conf;
+ __le16 chip_conf;
- u16 board_conf;
+ __le16 board_conf;
- u16 string1, string2, string3;
+ __le16 string1, string2, string3;
u8 string_idx_table;
};