Lines Matching refs:c8sectpfe
126 static struct c8sectpfe *c8sectpfe_create(struct c8sectpfei *fei, in c8sectpfe_create()
130 struct c8sectpfe *c8sectpfe; in c8sectpfe_create() local
136 c8sectpfe = kzalloc(sizeof(struct c8sectpfe), GFP_KERNEL); in c8sectpfe_create()
137 if (!c8sectpfe) in c8sectpfe_create()
140 mutex_init(&c8sectpfe->lock); in c8sectpfe_create()
142 c8sectpfe->device = fei->dev; in c8sectpfe_create()
144 result = dvb_register_adapter(&c8sectpfe->adapter, "STi c8sectpfe", in c8sectpfe_create()
152 c8sectpfe->adapter.priv = fei; in c8sectpfe_create()
156 c8sectpfe->demux[i].tsin_index = i; in c8sectpfe_create()
157 c8sectpfe->demux[i].c8sectpfei = fei; in c8sectpfe_create()
159 result = register_dvb(&c8sectpfe->demux[i], &c8sectpfe->adapter, in c8sectpfe_create()
168 unregister_dvb(&c8sectpfe->demux[j]); in c8sectpfe_create()
173 c8sectpfe->num_feeds = fei->tsin_count; in c8sectpfe_create()
175 return c8sectpfe; in c8sectpfe_create()
177 dvb_unregister_adapter(&c8sectpfe->adapter); in c8sectpfe_create()
179 kfree(c8sectpfe); in c8sectpfe_create()
184 static void c8sectpfe_delete(struct c8sectpfe *c8sectpfe) in c8sectpfe_delete() argument
188 if (!c8sectpfe) in c8sectpfe_delete()
191 for (i = 0; i < c8sectpfe->num_feeds; i++) in c8sectpfe_delete()
192 unregister_dvb(&c8sectpfe->demux[i]); in c8sectpfe_delete()
194 dvb_unregister_adapter(&c8sectpfe->adapter); in c8sectpfe_delete()
196 kfree(c8sectpfe); in c8sectpfe_delete()
199 void c8sectpfe_tuner_unregister_frontend(struct c8sectpfe *c8sectpfe, in c8sectpfe_tuner_unregister_frontend() argument
224 c8sectpfe_delete(c8sectpfe); in c8sectpfe_tuner_unregister_frontend()
227 int c8sectpfe_tuner_register_frontend(struct c8sectpfe **c8sectpfe, in c8sectpfe_tuner_register_frontend() argument
236 *c8sectpfe = c8sectpfe_create(fei, start_feed, stop_feed); in c8sectpfe_tuner_register_frontend()
237 if (!*c8sectpfe) in c8sectpfe_tuner_register_frontend()
243 res = c8sectpfe_frontend_attach(&frontend, *c8sectpfe, tsin, n); in c8sectpfe_tuner_register_frontend()
247 res = dvb_register_frontend(&c8sectpfe[0]->adapter, frontend); in c8sectpfe_tuner_register_frontend()
260 c8sectpfe_tuner_unregister_frontend(*c8sectpfe, fei); in c8sectpfe_tuner_register_frontend()