[linux-dvb] idea on how to break the static dependencies on
demodulator modules
Andrew de Quincey
adq_dvb at lidskialf.net
Tue Apr 18 10:38:18 CEST 2006
> Hey, this is a great idea! And surprisingly simple.
> No more loading of frontend drivers which are not required!
>
> Does request_module() log a message if the module cannot be loaded?
> If yes, fine. If no, a message should be logged by the DVB_ATTACH macro:
>
> #define DVB_ATTACH(RESULT, MODULE, FUNCTION,ARGS...) \
> do { \
> typeof(&FUNCTION) __a; \
> request_module(MODULE); \
> __a = symbol_get(FUNCTION); \
> if (__a) \
> RESULT = __a(ARGS); \
> else { \
> printk("unable to load %s\n", MODULE); \
> RESULT = NULL; \
> } \
> } while(0);
>
> Looks perfect otherise. Great idea!
Heh, glad you agree :)
Good idea about the logging... will add it.
More information about the linux-dvb
mailing list