Mailing List archive

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

[linux-dvb] Re: refactoring



> > > > There is no private data any longer.
> > >
> > > Yes, I've seen the code now.  Thats is a serve design bug.  The drivers
> > > private data should not be public.  And it should be allocated and freed
> > > by the driver itself and not by someone else.
> >
> > My take on this was that the demod drivers are meant to be as simple and as
> > small as possible. I didn't really see the point in hiding the private data
> > with this in mind.
> 
> Don't think of the demodulators as seperate drivers - they're not. The 
> refactoring turns the "frontend drivers" into a library of routines used by 
> specific card implementations. My view is that the card drivers should 
> therefore allocate the memory needed by the library routines.

Even a sane designed library will allocate and release the data
structures itself and *not* ask the user of the library to do that.
Data structures which are private (to the driver, to library or whatever
you prefeare to call it) should be maintained by the owner and not
someone else.  Not designing it this way is just insane and asking for
trouble, please don't.

  Gerd

-- 
return -ENOSIG;




Home | Main Index | Thread Index