Subject: Re: MD hooks in zsopen()/zsclose()
To: Julian Coleman <J.D.Coleman@newcastle.ac.uk>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 03/08/2000 10:12:49
On Wed, 8 Mar 2000 07:46:43 +0000 
 Julian Coleman <J.D.Coleman@newcastle.ac.uk> wrote:

 > > The only two things which come to mind now are: maybe change the tabbing
 > > where you included the enable and disable in the chanstate? Also, will the
 > > memory used by the chan states be null-initialized? If not, everything
 > > other than your tadpole might start jumping off null pointers. :-)
 > 
 > Tabbing improved.  Values initialised.

Nonono!  Those are structures are zero'd already... no need to initialize
them like this!

 > --- dev/ic/z8530sc.h.dist	Sat Mar 27 12:23:13 1999
 > +++ dev/ic/z8530sc.h	Tue Mar  7 18:40:54 2000
 > @@ -113,6 +113,12 @@
 >  
 >  	char	cs_softreq;		/* need soft interrupt call */
 >  	char	cs_spare1;  	/* (for skippy :) */
 > +
 > +	/* power management hooks */
 > +	int	(*enable) __P((struct zs_chanstate *)) = NULL;
 > +	void	(*disable) __P((struct zs_chanstate *)) = NULL;
 > +	int	enabled = 0;
 > +
 >  	/* MD code might define a larger variant of this. */
 >  };
 >  

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>