Date: Thu, 18 Mar 2004 16:10:06 +0800 (CST) From: "M. Warner Losh" <imp@bsdimp.com> To: new-bus@freebsd.org Subject: ppbus probe problem Message-ID: <20040318.161006.25162359.imp@bsdimp.com>
next in thread | raw e-mail | index | archive | help
: What is the correct way to fix the probe call incrementing problem?
Typically this is done by checking to see if there's a child already.
However, all the ISA drivers don't do this... At work we've worked
around this problem like so:
static void
sub00798identify(driver_t * driver, device_t parent)
{
devclass_t dc;
dc = devclass_find(DRIVERNAME);
if (devclass_get_device(dc, 0) == NULL)
{
if (BUS_ADD_CHILD(parent, 0, DRIVERNAME, 0) == 0)
panic("failed to add " DRIVERNAME);
}
}
Warner
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040318.161006.25162359.imp>
