Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Mar 2004 11:21:16 +0100
From:      Guido van Rooij <guido@gvr.org>
To:        Doug Rabson <dfr@nlsystems.com>
Cc:        new-bus@freebsd.org
Subject:   Re: ppbus probe problem
Message-ID:  <20040318102116.GA89179@gvr.gvr.org>
In-Reply-To: <200403181012.43455.dfr@nlsystems.com>
References:  <20040318080230.GA87270@gvr.gvr.org> <200403180913.33873.dfr@nlsystems.com> <20040318100553.GA88901@gvr.gvr.org> <200403181012.43455.dfr@nlsystems.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Mar 18, 2004 at 10:12:43AM +0000, Doug Rabson wrote:
> On Thursday 18 March 2004 10:05, Guido van Rooij wrote:
> > On Thu, Mar 18, 2004 at 09:13:33AM +0000, Doug Rabson wrote:
> > > I would use something like:
> > >
> > > static void
> > > vpo_identify(driver_t *driver, device_t parent)
> > > {
> > > 	device_t dev;
> > >
> > > 	dev = device_find_child(parent, "vpo", 0);
> > > 	if (!dev)
> > > 		BUS_ADD_CHILD(parent, 0, "vpo", -1);
> > > }
> >
> > So I'll update all of the ppbus drivers that way. Okay?
> 
> I think so. Warner, do you have any objections?
> 
> In an ideal world, there should be some kind of BUS_UNIDENTIFY method 
> which a driver could use to delete the devices it created in 
> BUS_IDENTIFY.

To me, that seems cleaner. The above doesn't work when a new device is
added to the system between the load and unload of the driver in question.
At least that's how I understand it.

-Guido



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040318102116.GA89179>