Mailing List archive

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

[linux-dvb] Re: refactoring



Gerd Knorr wrote:

Andrew de Quincey <adq_dvb@lidskialf.net> writes:


[snip]


the ioctl wrapper is only implemented
once for all drivers (the demod code could communicate with the frontend
infrastructure via a thin function-pointer-in-struct interface).

Interesting idea this one - this is the sort of thing I'm trying to sort out with the refactoring.

I don't think it is useful. If I look at the cx22702 fe code for
example I don't see how trying to replace cx22702_ioctl() with
something generic + function pointer hooks would improve things. Most
of the code is just mapping dvb api enums+defines to hardware specific
values and visa versa, that isn't something which can be shared with
other frontend drivers ...

In most drivers this function is just mapping the ioctl commands to existing functions. Unifying this into a typesafe interface makes it cleaner, safes some bytes of code (since we need this wrapper only once) and allows easy funtion overloading and replacement by the card drivers, no more if(card_type=XXX) stuff in the implementation.

Holger





Home | Main Index | Thread Index