aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorJean Delvare <khali@linux-fr.org>2005-08-11 17:51:10 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2005-09-05 12:14:32 -0400
commit1684a984303abbfc39aa8b59b0fe825c717811a9 (patch)
tree5ba646c7c81f1ed3a2bbc032a412dcff21fc7c37 /drivers/media/dvb
parentc7a46533ff7ef9e1c51bae6e54208527c5275b24 (diff)
[PATCH] I2C: Kill i2c_algorithm.id (6/7)
In theory, there should be no more users of I2C_ALGO_* at this point. However, it happens that several drivers were using I2C_ALGO_* for adapter ids, so we need to correct these before we can get rid of all the I2C_ALGO_* definitions. Note that this also fixes a bug in media/video/tvaudio.c: /* don't attach on saa7146 based cards, because dedicated drivers are used */ if ((adap->id & I2C_ALGO_SAA7146)) return 0; This test was plain broken, as it would succeed for many more adapters than just the saa7146: any those id would share at least one bit with the saa7146 id. We are really lucky that the few other adapters we want this driver to work with did not fulfill that condition. Signed-off-by: Jean Delvare <khali@linux-fr.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/b2c2/flexcop-i2c.c1
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-i2c.c1
-rw-r--r--drivers/media/dvb/pluto2/pluto2.c1
-rw-r--r--drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c1
4 files changed, 0 insertions, 4 deletions
diff --git a/drivers/media/dvb/b2c2/flexcop-i2c.c b/drivers/media/dvb/b2c2/flexcop-i2c.c
index 848910ff3c9c..56495cb6cd02 100644
--- a/drivers/media/dvb/b2c2/flexcop-i2c.c
+++ b/drivers/media/dvb/b2c2/flexcop-i2c.c
@@ -190,7 +190,6 @@ int flexcop_i2c_init(struct flexcop_device *fc)
190 fc->i2c_adap.class = I2C_CLASS_TV_DIGITAL; 190 fc->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
191 fc->i2c_adap.algo = &flexcop_algo; 191 fc->i2c_adap.algo = &flexcop_algo;
192 fc->i2c_adap.algo_data = NULL; 192 fc->i2c_adap.algo_data = NULL;
193 fc->i2c_adap.id = I2C_ALGO_BIT;
194 193
195 if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0) 194 if ((ret = i2c_add_adapter(&fc->i2c_adap)) < 0)
196 return ret; 195 return ret;
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
index 9f0a8d90d146..da970947dfc7 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
@@ -27,7 +27,6 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
27#endif 27#endif
28 d->i2c_adap.algo = d->props.i2c_algo; 28 d->i2c_adap.algo = d->props.i2c_algo;
29 d->i2c_adap.algo_data = NULL; 29 d->i2c_adap.algo_data = NULL;
30 d->i2c_adap.id = I2C_ALGO_BIT;
31 30
32 i2c_set_adapdata(&d->i2c_adap, d); 31 i2c_set_adapdata(&d->i2c_adap, d);
33 32
diff --git a/drivers/media/dvb/pluto2/pluto2.c b/drivers/media/dvb/pluto2/pluto2.c
index 706e0bcb5ede..85b437bbddcd 100644
--- a/drivers/media/dvb/pluto2/pluto2.c
+++ b/drivers/media/dvb/pluto2/pluto2.c
@@ -633,7 +633,6 @@ static int __devinit pluto2_probe(struct pci_dev *pdev,
633 i2c_set_adapdata(&pluto->i2c_adap, pluto); 633 i2c_set_adapdata(&pluto->i2c_adap, pluto);
634 strcpy(pluto->i2c_adap.name, DRIVER_NAME); 634 strcpy(pluto->i2c_adap.name, DRIVER_NAME);
635 pluto->i2c_adap.owner = THIS_MODULE; 635 pluto->i2c_adap.owner = THIS_MODULE;
636 pluto->i2c_adap.id = I2C_ALGO_BIT;
637 pluto->i2c_adap.class = I2C_CLASS_TV_DIGITAL; 636 pluto->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
638 pluto->i2c_adap.dev.parent = &pdev->dev; 637 pluto->i2c_adap.dev.parent = &pdev->dev;
639 pluto->i2c_adap.algo_data = &pluto->i2c_bit; 638 pluto->i2c_adap.algo_data = &pluto->i2c_bit;
diff --git a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
index 11afec52f31f..7daf7b1598a0 100644
--- a/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
+++ b/drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
@@ -1523,7 +1523,6 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
1523#endif 1523#endif
1524 ttusb->i2c_adap.algo = &ttusb_dec_algo; 1524 ttusb->i2c_adap.algo = &ttusb_dec_algo;
1525 ttusb->i2c_adap.algo_data = NULL; 1525 ttusb->i2c_adap.algo_data = NULL;
1526 ttusb->i2c_adap.id = I2C_ALGO_BIT;
1527 1526
1528 result = i2c_add_adapter(&ttusb->i2c_adap); 1527 result = i2c_add_adapter(&ttusb->i2c_adap);
1529 if (result) { 1528 if (result) {