Subject: Re: Parameter passing in the kernel
To: None <lloyd@must-have-coffee.gen.nz, tech-kern@netbsd.org>
From: None <eeh@netbsd.org>
List: tech-kern
Date: 06/18/2001 22:47:54
	With the layered device driver structure that is used extensively in
	NetBSD to provide machine, bus and in some cases chip independence we
	often find the following paradigm:

		static void
		xx_bus_attach (struct device *self, _ATTACH_ARGS_)
		{
			struct xx_softc *xx = (struct xx_softc *xx)self;

			_DO_SOME_STUFF_

			xx->xx_DATA1 = _DATA1_;
			xx->xx_DATA2 = _DATA2_;
			xx->xx_DATA3 = _DATA3_;
			xxattach (xx, _ATTACH_ARGS_);
		}

Once device properties are added to the kernel, this will
all change.  You can read about device properties in the
tech-kern archives.

Eduardo