Mailing List archive

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

[linux-dvb] Re: refactoring



Holger Waechtler <holger@qanu.de> writes:

> 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)

I doube you actually save code.  The wrapper isn't very big, and if
you splitup the one ioctl into many small functions you'll have some
overhead for all these function (stackframe etc).  You also have to
setup the function pointer struct ...

> and allows easy funtion overloading and replacement by the card
> drivers, no more if(card_type=XXX) stuff in the implementation.

You don't need a ioctl wrapper for that (see other mail).

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index