]> err.no Git - linux-2.6/blobdiff - drivers/media/video/bt8xx/bttv-i2c.c
Merge branch 'bkl-removal' into next
[linux-2.6] / drivers / media / video / bt8xx / bttv-i2c.c
index 70de6c96e201c9dba69a010d1b40d9d8294bc64a..4d5b8035e46634d31ade156cbee392130299be09 100644 (file)
@@ -28,7 +28,6 @@
 */
 
 #include <linux/module.h>
-#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/delay.h>
 
@@ -125,12 +124,6 @@ static struct i2c_adapter bttv_i2c_adap_sw_template = {
 /* ----------------------------------------------------------------------- */
 /* I2C functions - hardware i2c                                            */
 
-static int algo_control(struct i2c_adapter *adapter,
-                       unsigned int cmd, unsigned long arg)
-{
-       return 0;
-}
-
 static u32 functionality(struct i2c_adapter *adap)
 {
        return I2C_FUNC_SMBUS_EMUL;
@@ -279,7 +272,6 @@ static int bttv_i2c_xfer(struct i2c_adapter *i2c_adap, struct i2c_msg *msgs, int
 
 static struct i2c_algorithm bttv_algo = {
        .master_xfer   = bttv_i2c_xfer,
-       .algo_control  = algo_control,
        .functionality = functionality,
 };
 
@@ -412,7 +404,7 @@ static void do_i2c_scan(char *name, struct i2c_client *c)
        unsigned char buf;
        int i,rc;
 
-       for (i = 0; i < 128; i++) {
+       for (i = 0; i < ARRAY_SIZE(i2c_devs); i++) {
                c->addr = i;
                rc = i2c_master_recv(c,&buf,0);
                if (rc < 0)
@@ -479,11 +471,7 @@ int __devexit fini_bttv_i2c(struct bttv *btv)
        if (0 != btv->i2c_rc)
                return 0;
 
-       if (btv->use_i2c_hw) {
-               return i2c_del_adapter(&btv->c.i2c_adap);
-       } else {
-               return i2c_bit_del_bus(&btv->c.i2c_adap);
-       }
+       return i2c_del_adapter(&btv->c.i2c_adap);
 }
 
 /*