Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92522
b: refs/heads/master
c: b412ba7
h: refs/heads/master
v: v3
  • Loading branch information
Mauro Carvalho Chehab committed Apr 24, 2008
1 parent f62211e commit cf7a6bd
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0be51b4671b3ae3ae544a0bb3d15b55478b55e72
refs/heads/master: b412ba781adcb484e8d9b19b30ae1d3a6b8c7d29
1 change: 0 additions & 1 deletion trunk/drivers/media/dvb/dvb-usb/cxusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,6 @@ static int cxusb_dvico_xc3028_tuner_attach(struct dvb_usb_adapter *adap)
struct xc2028_config cfg = {
.i2c_adap = &adap->dev->i2c_adap,
.i2c_addr = 0x61,
.video_dev = adap->dev,
.callback = dvico_bluebird_xc2028_callback,
};
static struct xc2028_ctrl ctl = {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/video/cx23885/cx23885-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,6 @@ static int dvb_register(struct cx23885_tsport *port)
struct xc2028_config cfg = {
.i2c_adap = &i2c_bus->i2c_adap,
.i2c_addr = 0x61,
.video_dev = port,
.callback = cx23885_hvr1500_xc3028_callback,
};
static struct xc2028_ctrl ctl = {
Expand Down
2 changes: 0 additions & 2 deletions trunk/drivers/media/video/cx88/cx88-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,6 @@ static int attach_xc3028(u8 addr, struct cx8802_dev *dev)
struct xc2028_config cfg = {
.i2c_adap = &dev->core->i2c_adap,
.i2c_addr = addr,
.video_dev = dev->core->i2c_adap.algo_data,
};

if (!dev->dvb.frontend) {
Expand Down Expand Up @@ -780,7 +779,6 @@ static int dvb_register(struct cx8802_dev *dev)
struct xc2028_config cfg = {
.i2c_adap = &dev->core->i2c_adap,
.i2c_addr = 0x61,
.video_dev = dev->core,
.callback = cx88_pci_nano_callback,
};
static struct xc2028_ctrl ctl = {
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/media/video/tuner-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,6 @@ static void set_type(struct i2c_client *c, unsigned int type,
struct xc2028_config cfg = {
.i2c_adap = t->i2c->adapter,
.i2c_addr = t->i2c->addr,
.video_dev = c->adapter->algo_data,
.callback = t->tuner_callback,
};
if (!xc2028_attach(&t->fe, &cfg)) {
Expand Down
15 changes: 12 additions & 3 deletions trunk/drivers/media/video/tuner-xc2028.c
Original file line number Diff line number Diff line change
Expand Up @@ -1155,21 +1155,27 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
if (debug)
printk(KERN_DEBUG "xc2028: Xcv2028/3028 init called!\n");

if (NULL == cfg || NULL == cfg->video_dev)
if (NULL == cfg)
return NULL;

if (!fe) {
printk(KERN_ERR "xc2028: No frontend!\n");
return NULL;
}

video_dev = cfg->video_dev;
video_dev = cfg->i2c_adap->algo_data;

if (debug)
printk(KERN_DEBUG "xc2028: video_dev =%p\n", video_dev);

mutex_lock(&xc2028_list_mutex);

list_for_each_entry(priv, &xc2028_list, xc2028_list) {
if (priv->video_dev == cfg->video_dev) {
if (&priv->i2c_props.adap->dev == &cfg->i2c_adap->dev) {
video_dev = NULL;
if (debug)
printk(KERN_DEBUG "xc2028: reusing device\n");

break;
}
}
Expand Down Expand Up @@ -1197,6 +1203,9 @@ struct dvb_frontend *xc2028_attach(struct dvb_frontend *fe,
fe->tuner_priv = priv;
priv->count++;

if (debug)
printk(KERN_DEBUG "xc2028: usage count is %i\n", priv->count);

memcpy(&fe->ops.tuner_ops, &xc2028_dvb_tuner_ops,
sizeof(xc2028_dvb_tuner_ops));

Expand Down

0 comments on commit cf7a6bd

Please sign in to comment.