summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-03-06 14:35:27 +0100
committerHans Verkuil <hverkuil@xs4all.nl>2009-03-06 14:35:27 +0100
commitaf06f2cdff1ca6217d3a46fe988e3704125b106d (patch)
tree67aac51af7eed951242f0aa4e1b239d4296b8ecb /linux/drivers/media/video
parente8d96ecabebb5b6311c9af066cf80f5018d59b9a (diff)
downloadmediapointer-dvb-s2-af06f2cdff1ca6217d3a46fe988e3704125b106d.tar.gz
mediapointer-dvb-s2-af06f2cdff1ca6217d3a46fe988e3704125b106d.tar.bz2
bttv: fix compile warnings for kernels < 2.6.20.
From: Hans Verkuil <hverkuil@xs4all.nl> Priority: normal Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-cards.c4
-rw-r--r--linux/drivers/media/video/bt8xx/bttv-i2c.c4
2 files changed, 8 insertions, 0 deletions
diff --git a/linux/drivers/media/video/bt8xx/bttv-cards.c b/linux/drivers/media/video/bt8xx/bttv-cards.c
index aed55398d..6868de9bd 100644
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c
@@ -3744,7 +3744,11 @@ static void __devinit osprey_eeprom(struct bttv *btv, const u8 ee[256])
unsigned short type;
for (i = 4*16; i < 8*16; i += 16) {
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 20)
+ u16 checksum = ip_compute_csum((unsigned char *)(ee + i), 16);
+#else
u16 checksum = ip_compute_csum(ee + i, 16);
+#endif
if ((checksum&0xff) + (checksum>>8) == 0xff)
break;
diff --git a/linux/drivers/media/video/bt8xx/bttv-i2c.c b/linux/drivers/media/video/bt8xx/bttv-i2c.c
index 66fc4e480..3e7812c5a 100644
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c
@@ -401,7 +401,11 @@ int __devinit init_bttv_i2c(struct bttv *btv)
strlcpy(btv->c.i2c_adap.name, "bt878",
sizeof(btv->c.i2c_adap.name));
btv->c.i2c_adap.id = I2C_HW_B_BT848; /* FIXME */
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 19)
+ btv->c.i2c_adap.algo = (struct i2c_algorithm *)&bttv_algo;
+#else
btv->c.i2c_adap.algo = &bttv_algo;
+#endif
} else {
/* bt848 */
/* Prevents usage of invalid delay values */