diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-06 14:35:27 +0100 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2009-03-06 14:35:27 +0100 |
commit | af06f2cdff1ca6217d3a46fe988e3704125b106d (patch) | |
tree | 67aac51af7eed951242f0aa4e1b239d4296b8ecb /linux/drivers/media | |
parent | e8d96ecabebb5b6311c9af066cf80f5018d59b9a (diff) | |
download | mediapointer-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')
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-cards.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/bt8xx/bttv-i2c.c | 4 |
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 */ |