Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 192675
b: refs/heads/master
c: 5b74c2c
h: refs/heads/master
i:
  192673: 43cc799
  192671: 9c4c949
v: v3
  • Loading branch information
Michel Ludwig authored and Mauro Carvalho Chehab committed May 18, 2010
1 parent 003875b commit 1349787
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 11 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: 47878f163f68bfc93483ba9bca82ac0283c751e5
refs/heads/master: 5b74c2c739064248bb9c78102e94751b317684d5
34 changes: 24 additions & 10 deletions trunk/drivers/staging/tm6000/tm6000-dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

#include <media/tuner.h>

#include "tuner-xc2028.h"

static void tm6000_urb_received(struct urb *urb)
{
int ret;
Expand Down Expand Up @@ -231,20 +233,29 @@ int tm6000_dvb_register(struct tm6000_core *dev)
THIS_MODULE, &dev->udev->dev);
dvb->adapter.priv = dev;

if(dvb->frontend) {
if (dvb->frontend) {
struct xc2028_config cfg = {
.i2c_adap = &dev->i2c_adap,
.video_dev = dev,
};

ret = dvb_register_frontend(&dvb->adapter, dvb->frontend);
if(ret < 0) {
printk("tm6000: couldn't register frontend\n");
if (ret < 0) {
printk(KERN_ERR
"tm6000: couldn't register frontend\n");
goto adapter_err;
}

// attach the tuner like this for now
tm6000_i2c_call_clients(dev, VIDIOC_INT_DVB_TUNER_ATTACH, dvb->frontend);

printk("tm6000: XC2028/3028 asked to be attached to frontend!\n");
}
else {
printk("tm6000: no frontend found\n");
if (!dvb_attach(xc2028_attach, dvb->frontend, &cfg)) {
printk(KERN_ERR "tm6000: couldn't register "
"frontend (xc3028)\n");
ret = -EINVAL;
goto adapter_err;
}
printk(KERN_INFO "tm6000: XC2028/3028 asked to be "
"attached to frontend!\n");
} else {
printk(KERN_ERR "tm6000: no frontend found\n");
}

dvb->demux.dmx.capabilities = DMX_TS_FILTERING | DMX_SECTION_FILTERING
Expand Down Expand Up @@ -278,6 +289,9 @@ int tm6000_dvb_register(struct tm6000_core *dev)
frontend_err:
if(dvb->frontend) {
dvb_unregister_frontend(dvb->frontend);
#ifdef CONFIG_DVB_CORE_ATTACH
symbol_put(xc3028_attach);
#endif
}
adapter_err:
dvb_unregister_adapter(&dvb->adapter);
Expand Down

0 comments on commit 1349787

Please sign in to comment.