vserver 1.9.3
[linux-2.6.git] / drivers / media / video / dpc7146.c
index 86ca8a4..d542444 100644 (file)
@@ -91,7 +91,7 @@ struct dpc
 /* fixme: add vbi stuff here */
 static int dpc_probe(struct saa7146_dev* dev)
 {
-       struct dpc* dpc = 0;    
+       struct dpc* dpc = NULL; 
        struct i2c_client *client;
        struct list_head *item;
 
@@ -106,7 +106,7 @@ static int dpc_probe(struct saa7146_dev* dev)
           video port pins should be enabled here ?! */
        saa7146_write(dev, MC1, (MASK_08 | MASK_24 | MASK_10 | MASK_26));
 
-       saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, I2C_ADAP_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480);
+       saa7146_i2c_adapter_prepare(dev, &dpc->i2c_adapter, I2C_CLASS_TV_ANALOG, SAA7146_I2C_BUS_BIT_RATE_480);
        if(i2c_add_adapter(&dpc->i2c_adapter) < 0) {
                DEB_S(("cannot register i2c-device. skipping.\n"));
                kfree(dpc);
@@ -123,6 +123,7 @@ static int dpc_probe(struct saa7146_dev* dev)
        /* check if all devices are present */
        if( 0 == dpc->saa7111a ) {
                DEB_D(("dpc_v4l2.o: dpc_attach failed for this device.\n"));    
+               i2c_del_adapter(&dpc->i2c_adapter);
                kfree(dpc);
                return -ENODEV;
        }