cvs commit: src/sys/sys bus.h rman.h types.h src/sys/kern subr_bus.c
Poul-Henning Kamp
phk at FreeBSD.org
Sat Sep 24 12:31:11 PDT 2005
phk 2005-09-24 19:31:10 UTC
FreeBSD src repository
Modified files:
sys/sys bus.h rman.h types.h
sys/kern subr_bus.c
Log:
Add two convenience functions for device drivers: bus_alloc_resources()
and bus_free_resources(). These functions take a list of resources
and handle them all in one go. A flag makes it possible to mark
a resource as optional.
A typical device driver can save 10-30 lines of code by using these.
Usage examples will follow RSN.
MFC: A good idea, eventually.
Revision Changes Path
1.186 +31 -0 src/sys/kern/subr_bus.c
1.72 +10 -5 src/sys/sys/bus.h
1.28 +1 -0 src/sys/sys/rman.h
1.93 +1 -0 src/sys/sys/types.h
More information about the cvs-src
mailing list