The patch number 10916 was added via Hans Verkuil <[email protected]>
to http://linuxtv.org/hg/v4l-dvb master development tree.

Kernel patches in this development tree may be modified to be backward
compatible with older kernels. Compatibility modifications will be
removed before inclusion into the mainstream Kernel

If anyone has any objections, please let us know by sending a message to:
        Linux Media Mailing List <[email protected]>

------

From: Hans Verkuil  <[email protected]>
bttv: fix compile warnings for kernels < 2.6.20.


Priority: normal

Signed-off-by: Hans Verkuil <[email protected]>


---

 linux/drivers/media/video/bt8xx/bttv-cards.c |    4 ++++
 linux/drivers/media/video/bt8xx/bttv-i2c.c   |    4 ++++
 2 files changed, 8 insertions(+)

diff -r 9d20f27a1f78 -r 09564ea937fd 
linux/drivers/media/video/bt8xx/bttv-cards.c
--- a/linux/drivers/media/video/bt8xx/bttv-cards.c      Fri Mar 06 14:20:00 
2009 +0100
+++ b/linux/drivers/media/video/bt8xx/bttv-cards.c      Fri Mar 06 14:35:27 
2009 +0100
@@ -3744,7 +3744,11 @@ static void __devinit osprey_eeprom(stru
                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 -r 9d20f27a1f78 -r 09564ea937fd linux/drivers/media/video/bt8xx/bttv-i2c.c
--- a/linux/drivers/media/video/bt8xx/bttv-i2c.c        Fri Mar 06 14:20:00 
2009 +0100
+++ b/linux/drivers/media/video/bt8xx/bttv-i2c.c        Fri Mar 06 14:35:27 
2009 +0100
@@ -401,7 +401,11 @@ int __devinit init_bttv_i2c(struct bttv 
                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 */


---

Patch is available at: 
http://linuxtv.org/hg/v4l-dvb/rev/09564ea937fd0af19e8e777c1183470f2825b7b9

_______________________________________________
linuxtv-commits mailing list
[email protected]
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linuxtv-commits

Reply via email to