Mailing List archive

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

[linux-dvb] Re: refactoring



Ralph Metzler wrote:

Holger Waechtler writes:

> > struct budget_with_stv0299 {
> struct pci_device pcidev;
> struct dma_related_stuff dma;
> struct stv0299_state_and_config stv0299;
> /* ans so on... */
> };
> > this card struct gets allocated once in the pci attach() can and freed > in the release() callback. No need for additional maintenance, kmalloc() > and kfree() anywhere.

Yes, but it has to be put into the card driver config for each kind of
possible frontend. Currently, the frontend driver handles it itself,
depending on which frontend is found.

Place the state structs of the frontend drivers used for a particular type of card into a union and you're done.

Holger





Home | Main Index | Thread Index