cvs commit: src/sys/netgraph/bluetooth/drivers/bt3c
ng_bt3c_pccard.c
John Baldwin
jhb at freebsd.org
Wed Oct 26 10:13:52 PDT 2005
On Wednesday 26 October 2005 12:33 pm, Maksim Yevmenkin wrote:
> John,
>
> [...]
>
> > Sorry about that, will be fixing it more cleanly. BTW, does anyone know
> > why this driver allocates its softc manualn in its attach routine?
>
> ng_bt3c(4) is a netgraph device driver. there could be failures in
> both device part (i/o port, interrupts etc.) as well as in netgraph
> part (could not create node). so decided to do it this way. right now
> i can not recall any other reason :)
Even if netgraph fails then new-bus will still free it for you when attach
returns ENXIO. All you have to do is set the size in your driver_t and axe
the malloc, free, and device_set_softc calls and you should be done.
--
John Baldwin <jhb at FreeBSD.org> <>< http://www.FreeBSD.org/~jhb/
"Power Users Use the Power to Serve" = http://www.FreeBSD.org
More information about the cvs-src
mailing list