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 Tue, Apr 18, 2006, Andrew de Quincey wrote:
> These use symbol_get() to dynamically get the address of the XXX_attach() 
> method and, if found, call it. Otherwise they fake a NULL return, and the 
> normal frontend failure code comes into effect.
...
> Can anyone see anything fundamentally wrong with doing it this way? Due to the 
> frontend refactoring a while back, we already have these nice tables of 
> function pointers everywhere anyway.

Sorry, I think it is a bad idea because it is not user friendly.

Normal people are challenged enough to find out which driver
to use for their card (especially true for budget vs. budget-ci
vs. budget-av).

The static dependencies on the frontend drivers ensures that
the necessary frontend drivers for all card variants are loaded,
without users having to worry about that.

The price to pay is a few K of wasted RAM, IMHO totally
insignificant compared to the MBytes of buffer space
some cards allocate.


OK, in case I can't talk you out of this, what you need to do
is to pull the probe code out of the demod drivers and create
frontends/probe.c. Then after probing you can request_module()
the necessary modules.
(I think this implies that it can't be done from a module_init()
function, which I think isn't a problem for PCI or USB drivers,
but could create headaches for embedded platforms. But please
check, I'm not sure about this.)
Also, it means that the Kconfig will still have to have the
frontend dependencies. You could add a "[x] manual frontend
selection for DVB experts", though.


About symbol_get(): Since there only two users in the
whole kernel, I recommend you check with akpm and lkml first
before you base your work on it.


Regards,
Johannes

_______________________________________________

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