list_add_tail(&dev->devlist,&cx8802_devlist);
mutex_init(&dev->frontends.lock);
- INIT_LIST_HEAD(&dev->frontends.frontend.felist);
+ INIT_LIST_HEAD(&dev->frontends.felist);
printk(KERN_INFO "%s() allocating %d frontend(s)\n", __func__, core->board.num_frontends);
/* Attach all of the frontends to the adapter */
mutex_lock(&f->lock);
- list_for_each_safe(list, q, &f->frontend.felist) {
+ list_for_each_safe(list, q, &f->felist) {
fe = list_entry(list, struct videobuf_dvb_frontend, felist);
-
res = videobuf_dvb_register_frontend(&f->adapter, &fe->dvb);
if (res < 0) {
printk(KERN_WARNING "%s: videobuf_dvb_register_frontend failed (errno = %d)\n",
struct videobuf_dvb_frontend *fe;
mutex_lock(&f->lock);
- list_for_each_safe(list, q, &f->frontend.felist) {
+ list_for_each_safe(list, q, &f->felist) {
fe = list_entry(list, struct videobuf_dvb_frontend, felist);
dvb_net_release(&fe->dvb.net);
mutex_lock(&f->lock);
- list_for_each_safe(list, q, &f->frontend.felist) {
+ list_for_each_safe(list, q, &f->felist) {
fe = list_entry(list, struct videobuf_dvb_frontend, felist);
if (fe->id == id) {
ret = fe;
mutex_lock(&f->lock);
- list_for_each_safe(list, q, &f->frontend.felist) {
+ list_for_each_safe(list, q, &f->felist) {
fe = list_entry(list, struct videobuf_dvb_frontend, felist);
if (fe->dvb.frontend == p) {
ret = fe->id;
mutex_init(&fe->dvb.lock);
mutex_lock(&f->lock);
- list_add_tail(&fe->felist,&f->frontend.felist);
+ list_add_tail(&fe->felist,&f->felist);
mutex_unlock(&f->lock);
fail_alloc:
int nfeeds;
/* videobuf_dvb_(un)register manges this */
- struct dvb_adapter adapter;
struct dvb_demux demux;
struct dmxdev dmxdev;
struct dmx_frontend fe_hw;
};
struct videobuf_dvb_frontend {
- void *dev;
struct list_head felist;
+ void *dev;
int id;
struct videobuf_dvb dvb;
};
struct videobuf_dvb_frontends {
+ struct list_head felist;
struct mutex lock;
struct dvb_adapter adapter;
int active_fe_id; /* Indicates which frontend in the felist is in use */
- struct videobuf_dvb_frontend frontend;
int gate; /* Frontend with gate control 0=!MFE,1=fe0,2=fe1 etc */
};