Mailing List archive

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

[linux-dvb] Re: refactoring



On Sat, Oct 09, 2004 at 01:27:22PM +0200, Johannes Stezenbach wrote:
> Gerd Knorr wrote:
> > struct dvb_fe* create_<fename>(/* whatever is needed for the fe in question */);
> 
> I would prefere this to the current code.
> 
> However, looking at av7110.c:frontend_init() I think that create_<fename>()
> would get too much paramters, which would make the code unreadable.
> 
> We could define a struct <fename>_config and pass that to
> create_<fename> to get around this.

We can decide that even on a frontend-by-frontend base as
create_<fename>() and the args passed to are frontend specific anyway.
For frontends which need lots of parameters it certainly makes sense to
have a config struct.  For the few ones needed for cx22702 I probably
wouldn't do it that way.

> <fename>_config could then be part of the frontends private data
> struct, and be assigned in create_<fename> via struct copy.

Yes, that is one possible way.  Its completely up to the fe driver how
he wants to handle that through.

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index