Mailing List archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[linux-dvb] Re: refactoring
On Sunday 10 Oct 2004 15:45, Gerd Knorr wrote:
> > Before anyone gets too excited, this was an experimental structure. I
> > think a better solution would be something like:
> >
> > struct dvb_fe {
> > struct fe_api *api;
> > struct dvb_adapter *dvb;
> > void *priv;
> > };
Issue: We need two void* in dvb_frontend.
One for the demodulator to store its private state+config in. Another for the
card driver to which the demodulator is attached to store something.
Reason:
struct at76c651_config
{
...
/* PLL maintenance */
int (*pll_init)(struct dvb_frontend* fe);
...
};
The pll_XXX() functions are implemented by the card driver - so it needs to
have its own internal state somewhere accessible as well.
My current prototyped XXX_attach() function is:
extern int at76c651_attach(struct at76c651_config* config,
struct dvb_frontend_ops* ops,
struct dvb_adapter* dvb,
void* adapter_data,
struct dvb_frontend** fe);
It allocates and returns a populated dvb_frontend structure to the caller.
Home |
Main Index |
Thread Index