Re: idea on how to break the static dependencies on demodulator modules

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sunday 14 May 2006 11:38, Johannes Stezenbach wrote:
> On Sat, May 13, 2006, Oliver Endriss wrote:
> > Trent Piepho wrote:
> > > First, let me say that chained frontends *isn't* something new that is
> > > mixed in with this attach/detach stuff.  It's already there.  See the
> > > lnbp21 driver for an example.
> >
> > Is chaining used anywhere else than in the lnbp21 driver?
> >
> > I introduced it because I thought that it would be a good idea to limit
> > the number of private pointers in struct dvb_frontend. ;-)
> >
> > Obviously it makes life harder, not easier. So just remove chaining from
> > lnbp21.[ch], and rename misc_priv to something like sec_priv...
> >
> > Imho it's not worth the trouble. ;-)
>
> IMHO this "chaining" of the release function is a bad
> concept. The card driver does the attach, so it should also
> do the release.
>
> Consider:
> 	foo = foo_attach();
> 	bar = bar_attach(foo);
> 	...
> 	bar->release();
> 	// do we leak foo now is it magically cleaned up?
>
> Please keep it simple and stupid, the four drivers which
> use lnbp21 can also keep a lnbp21 pointer around and
> release it explicitly.

Hmm, well we could make a rule that you never chain the release() function, 
even though you are allowed to do so for the other function pointers... would 
this be ok? Then we would always have a pointer to each used module, and 
hence using symbol_put_addr() would be fine.

As for symbol_put_addr - well we've had absolutely zero response to the 
patches - both you and Trent have tried to get someone to look at 'em on 
LKML, and there's been complete silence... did we have a compat.h patch so 
that we can experiment using symbol_put_addr() in the meantime? If one of you 
wants to send it, I'll update the repos to use it and remove the chaining so 
we can see what that looks like.

_______________________________________________

linux-dvb@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/linux-dvb

[Index of Archives]     [Linux Media]     [Video 4 Linux]     [Asterisk]     [Samba]     [Xorg]     [Xfree86]     [Linux USB]

  Powered by Linux