[media] i2c: Stop using I2C_CLASS_TV_DIGITAL
authorJean Delvare <khali@linux-fr.org>
Wed, 13 Oct 2010 12:24:25 +0000 (09:24 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 21 Oct 2010 09:54:26 +0000 (07:54 -0200)
Detection class I2C_CLASS_TV_DIGITAL is set by many adapters but no
I2C device driver is setting it anymore, which means it can be
dropped. I2C devices on digital TV adapters are instantiated
explicitly these days, which is much better.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
15 files changed:
drivers/media/dvb/b2c2/flexcop-i2c.c
drivers/media/dvb/dm1105/dm1105.c
drivers/media/dvb/dvb-usb/af9015.c
drivers/media/dvb/dvb-usb/dvb-usb-i2c.c
drivers/media/dvb/frontends/cx24123.c
drivers/media/dvb/frontends/dibx000_common.c
drivers/media/dvb/frontends/s5h1420.c
drivers/media/dvb/mantis/mantis_i2c.c
drivers/media/dvb/ngene/ngene-i2c.c
drivers/media/dvb/pluto2/pluto2.c
drivers/media/dvb/pt1/pt1.c
drivers/media/dvb/ttpci/av7110.c
drivers/media/dvb/ttpci/budget-core.c
drivers/media/dvb/ttusb-budget/dvb-ttusb-budget.c
drivers/media/video/cx88/cx88-vp3054-i2c.c

index fd1df2352764d4efa7296aeaeaf81d385512d4f4..965d5eb33752bc9ff436c13dbdb728a56dc32016 100644 (file)
@@ -245,9 +245,6 @@ int flexcop_i2c_init(struct flexcop_device *fc)
        i2c_set_adapdata(&fc->fc_i2c_adap[1].i2c_adap, &fc->fc_i2c_adap[1]);
        i2c_set_adapdata(&fc->fc_i2c_adap[2].i2c_adap, &fc->fc_i2c_adap[2]);
 
-       fc->fc_i2c_adap[0].i2c_adap.class =
-               fc->fc_i2c_adap[1].i2c_adap.class =
-               fc->fc_i2c_adap[2].i2c_adap.class = I2C_CLASS_TV_DIGITAL;
        fc->fc_i2c_adap[0].i2c_adap.algo =
                fc->fc_i2c_adap[1].i2c_adap.algo =
                fc->fc_i2c_adap[2].i2c_adap.algo = &flexcop_algo;
index bca07c0bcd01e4b872bd02a364bc760fd38735d5..5d404f1bf03653c844c88c6efa850f0ef2ecbef9 100644 (file)
@@ -862,7 +862,6 @@ static int __devinit dm1105_probe(struct pci_dev *pdev,
        i2c_set_adapdata(&dev->i2c_adap, dev);
        strcpy(dev->i2c_adap.name, DRIVER_NAME);
        dev->i2c_adap.owner = THIS_MODULE;
-       dev->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
        dev->i2c_adap.dev.parent = &pdev->dev;
        dev->i2c_adap.algo = &dm1105_algo;
        dev->i2c_adap.algo_data = dev;
index 63ba76bc2339d8efdfebad576a3da0e100c0ced5..759cbf81a4d3296bc0bed3c3a10ca1aaa879bd8e 100644 (file)
@@ -1083,11 +1083,6 @@ static int af9015_i2c_init(struct dvb_usb_device *d)
 
        strncpy(state->i2c_adap.name, d->desc->name,
                sizeof(state->i2c_adap.name));
-#ifdef I2C_ADAP_CLASS_TV_DIGITAL
-       state->i2c_adap.class = I2C_ADAP_CLASS_TV_DIGITAL,
-#else
-       state->i2c_adap.class = I2C_CLASS_TV_DIGITAL,
-#endif
        state->i2c_adap.algo      = d->props.i2c_algo;
        state->i2c_adap.algo_data = NULL;
        state->i2c_adap.dev.parent = &d->udev->dev;
index cead089bbb4ff268cc91c78a97b627fa064cc7eb..88e4a62abc44db45e72ea93bc46334805e0ef2f7 100644 (file)
@@ -20,7 +20,6 @@ int dvb_usb_i2c_init(struct dvb_usb_device *d)
        }
 
        strlcpy(d->i2c_adap.name, d->desc->name, sizeof(d->i2c_adap.name));
-       d->i2c_adap.class = I2C_CLASS_TV_DIGITAL,
        d->i2c_adap.algo      = d->props.i2c_algo;
        d->i2c_adap.algo_data = NULL;
        d->i2c_adap.dev.parent = &d->udev->dev;
index d8f921b6fafdc330cbbc4e3e1486f04165858413..fad6a990a39bcc1bfd3c0db0fdabf43a773d2389 100644 (file)
@@ -1108,7 +1108,6 @@ struct dvb_frontend *cx24123_attach(const struct cx24123_config *config,
 
        strlcpy(state->tuner_i2c_adapter.name, "CX24123 tuner I2C bus",
                sizeof(state->tuner_i2c_adapter.name));
-       state->tuner_i2c_adapter.class     = I2C_CLASS_TV_DIGITAL,
        state->tuner_i2c_adapter.algo      = &cx24123_tuner_i2c_algo;
        state->tuner_i2c_adapter.algo_data = NULL;
        i2c_set_adapdata(&state->tuner_i2c_adapter, state);
index 980e02f1575e35f6ce56f6c208988b87ba69a47c..a4991026254dc0223c71f06f475634338c8e2e2d 100644 (file)
@@ -130,7 +130,6 @@ static int i2c_adapter_init(struct i2c_adapter *i2c_adap,
                            struct dibx000_i2c_master *mst)
 {
        strncpy(i2c_adap->name, name, sizeof(i2c_adap->name));
-       i2c_adap->class = I2C_CLASS_TV_DIGITAL, i2c_adap->algo = algo;
        i2c_adap->algo_data = NULL;
        i2c_set_adapdata(i2c_adap, mst);
        if (i2c_add_adapter(i2c_adap) < 0)
index 2e9fd2893ede8e573fd8d56adb92e59055f75636..e87b747ea99c4f84d9b1b808b528f4799355bdcd 100644 (file)
@@ -920,7 +920,6 @@ struct dvb_frontend *s5h1420_attach(const struct s5h1420_config *config,
        /* create tuner i2c adapter */
        strlcpy(state->tuner_i2c_adapter.name, "S5H1420-PN1010 tuner I2C bus",
                sizeof(state->tuner_i2c_adapter.name));
-       state->tuner_i2c_adapter.class     = I2C_CLASS_TV_DIGITAL,
        state->tuner_i2c_adapter.algo      = &s5h1420_tuner_i2c_algo;
        state->tuner_i2c_adapter.algo_data = NULL;
        i2c_set_adapdata(&state->tuner_i2c_adapter, state);
index 7870bcf9689ab9fa4d4bd946103b45c0e019b994..e7794517fe26c36098ff1d56fffcbde814e52a37 100644 (file)
@@ -229,7 +229,6 @@ int __devinit mantis_i2c_init(struct mantis_pci *mantis)
        i2c_set_adapdata(i2c_adapter, mantis);
 
        i2c_adapter->owner      = THIS_MODULE;
-       i2c_adapter->class      = I2C_CLASS_TV_DIGITAL;
        i2c_adapter->algo       = &mantis_algo;
        i2c_adapter->algo_data  = NULL;
        i2c_adapter->timeout    = 500;
index 38074e9cbb6d06d76b81dfadfbbce2bd496e8248..c3ae956714e77501954d17bc1a34843200365b2f 100644 (file)
@@ -165,7 +165,6 @@ int ngene_i2c_init(struct ngene *dev, int dev_nr)
        struct i2c_adapter *adap = &(dev->channel[dev_nr].i2c_adapter);
 
        i2c_set_adapdata(adap, &(dev->channel[dev_nr]));
-       adap->class = I2C_CLASS_TV_DIGITAL;
 
        strcpy(adap->name, "nGene");
 
index 1c798219dc7ce02205205576b763a25e9da9de66..6ca6713d527ada0b1c0e487aa850655864a43977 100644 (file)
@@ -647,7 +647,6 @@ static int __devinit pluto2_probe(struct pci_dev *pdev,
        i2c_set_adapdata(&pluto->i2c_adap, pluto);
        strcpy(pluto->i2c_adap.name, DRIVER_NAME);
        pluto->i2c_adap.owner = THIS_MODULE;
-       pluto->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
        pluto->i2c_adap.dev.parent = &pdev->dev;
        pluto->i2c_adap.algo_data = &pluto->i2c_bit;
        pluto->i2c_bit.data = pluto;
index 69ad94934ec2d2af1a378dff1286243f81a7c2c6..0486919c1d0f3006a092378f4108e43b4620ccd5 100644 (file)
@@ -1087,7 +1087,6 @@ pt1_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
        pt1_update_power(pt1);
 
        i2c_adap = &pt1->i2c_adap;
-       i2c_adap->class = I2C_CLASS_TV_DIGITAL;
        i2c_adap->algo = &pt1_i2c_algo;
        i2c_adap->algo_data = NULL;
        i2c_adap->dev.parent = &pdev->dev;
index a6be529eec5ca72e3dd8f965e334b956b4911557..bc5683ef7f10abf44fc2b40842999d82e4514c31 100644 (file)
@@ -2476,7 +2476,6 @@ static int __devinit av7110_attach(struct saa7146_dev* dev,
           get recognized before the main driver is fully loaded */
        saa7146_write(dev, GPIO_CTRL, 0x500000);
 
-       av7110->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
        strlcpy(av7110->i2c_adap.name, pci_ext->ext_priv, sizeof(av7110->i2c_adap.name));
 
        saa7146_i2c_adapter_prepare(dev, &av7110->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120); /* 275 kHz */
index ba18e56d5f11295bb8bb79b9ce7d4e5d4a608b4b..847f6601d84216e1bec277b4ed42a92a69887974 100644 (file)
@@ -495,8 +495,6 @@ int ttpci_budget_init(struct budget *budget, struct saa7146_dev *dev,
        if (bi->type != BUDGET_FS_ACTIVY)
                saa7146_write(dev, GPIO_CTRL, 0x500000);        /* GPIO 3 = 1 */
 
-       budget->i2c_adap.class = I2C_CLASS_TV_DIGITAL;
-
        strlcpy(budget->i2c_adap.name, budget->card->name, sizeof(budget->i2c_adap.name));
 
        saa7146_i2c_adapter_prepare(dev, &budget->i2c_adap, SAA7146_I2C_BUS_BIT_RATE_120);
index 4a3f2b8ea37d448a6cb0f062cc089e2d63114ff7..40625b26ac10a52a305d156f91b7040abba73a39 100644 (file)
@@ -1694,7 +1694,6 @@ static int ttusb_probe(struct usb_interface *intf, const struct usb_device_id *i
 
        i2c_set_adapdata(&ttusb->i2c_adap, ttusb);
 
-       ttusb->i2c_adap.class             = I2C_CLASS_TV_DIGITAL;
        ttusb->i2c_adap.algo              = &ttusb_dec_algo;
        ttusb->i2c_adap.algo_data         = NULL;
        ttusb->i2c_adap.dev.parent        = &udev->dev;
index 794f2932b75554bee6cb1adef6e24e9856b9f74a..ec5476d8b10bf7c7f711e39ddfe0953d6922c866 100644 (file)
@@ -121,8 +121,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev)
        memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template,
               sizeof(vp3054_i2c->algo));
 
-       vp3054_i2c->adap.class |= I2C_CLASS_TV_DIGITAL;
-
        vp3054_i2c->adap.dev.parent = &dev->pci->dev;
        strlcpy(vp3054_i2c->adap.name, core->name,
                sizeof(vp3054_i2c->adap.name));