aboutsummaryrefslogtreecommitdiff
path: root/drivers/media/dvb/dvb-usb/af9015.h
diff options
context:
space:
mode:
authorJiri Slaby <jslaby@suse.cz>2010-01-22 12:10:52 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-02-26 15:10:52 -0300
commit6c614044ff00bf3e7403ac6c4ed4e53db8c349f3 (patch)
tree52ea3e4cdeae03ae444cd155ab96cf87e94c04c4 /drivers/media/dvb/dvb-usb/af9015.h
parent0b32d65cd7938d31eebd9c62aab6a59a3c4cf0f8 (diff)
V4L/DVB: media: dvb/af9015, implement eeprom hashing
This will be useful for matching of IR tables later. We read the eeprom anyway for dumping. Switch the dumping to print_hex_dump_bytes and compute hash above that by hash = 0; for (u32 VAL) in (eeprom): hash *= GOLDEN_RATIO_PRIME_32 hash += VAL; // while preserving endinaness The computation is moved earlier to the flow, namely from af9015_af9013_frontend_attach to af9015_read_config, so that we can access the sum in af9015_read_config already. Signed-off-by: Jiri Slaby <jslaby@suse.cz> Acked-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb/dvb-usb/af9015.h')
-rw-r--r--drivers/media/dvb/dvb-usb/af9015.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9015.h b/drivers/media/dvb/dvb-usb/af9015.h
index 931c8515830..ef36b183149 100644
--- a/drivers/media/dvb/dvb-usb/af9015.h
+++ b/drivers/media/dvb/dvb-usb/af9015.h
@@ -107,6 +107,7 @@ struct af9015_config {
u16 mt2060_if1[2];
u16 firmware_size;
u16 firmware_checksum;
+ u32 eeprom_sum;
u8 *ir_table;
u16 ir_table_size;
};