On Thu, May 11, 2006, Trent Piepho wrote: > On Fri, 12 May 2006, Johannes Stezenbach wrote: > > You know, instead of messing with *all* frontend drivers > > and the internals of dvb_unregister_frontend(), I think > > it would be much better to: > > I agree with you, it would be better, but I can't think of a way to do it. > > > - add dvb_attach() and dvb_detach() functions > > - leave frontend drivers unmodified > > - so nothing changes for out-of-tree STB like users like tuxbox > > How can dvb_detach() work, satisfy your three requirements here, AND still > work with chained front-ends? > > Without chained frontends, it's easy enough (*): > > int dvb_detach(struct dvb_frontend* fe) > { > void *addr = (void*)fe->ops->release; > dvb_unregister_frontend(fe); > symbol_put_addr(addr); > } > > But this doesn't work at all with chained frontends. Looks like I didn't get something... What is a "chained frontend"? How is this handled currently without dvb_attach()? Why does it need to be handled differently with dvb_attach()? Did you/Andrew mix two different concepts (chaining vs. dvb_attach) in the same patchset? Please explain. > (*) This assumes, currently correctly, that foo_attach() and foo_release() are > in the same module why? dvb_attach() incs the frontend module ref count, dvb_detach() decs it -- no matter where they are called from > and that symbol_put/get does module level ref counting and > not symbol level. What a crazy idea to do symbol level ref counting... The kernel doesn't do that. Johannes _______________________________________________ linux-dvb@xxxxxxxxxxx http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb