svn commit: r227978 - in stable/8: share/examples/drivers
share/man/man9 sys/sys
Marius Strobl
marius at FreeBSD.org
Fri Nov 25 17:08:33 UTC 2011
Author: marius
Date: Fri Nov 25 17:08:33 2011
New Revision: 227978
URL: http://svn.freebsd.org/changeset/base/227978
Log:
MFC: r227829, r227844
- Add a DEVMETHOD_END alias for KOBJMETHOD_END so that along with 'driver_t'
and DEVMETHOD() we can fully hide the explicit mention of kobj(9) from
device drivers.
- Update the device driver examples to use DEVMETHOD_END.
Submitted by: jhb
Modified:
stable/8/share/examples/drivers/make_device_driver.sh
stable/8/share/man/man9/driver.9
stable/8/sys/sys/bus.h
Directory Properties:
stable/8/share/examples/ (props changed)
stable/8/share/examples/cvsup/ (props changed)
stable/8/share/man/man9/ (props changed)
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
Modified: stable/8/share/examples/drivers/make_device_driver.sh
==============================================================================
--- stable/8/share/examples/drivers/make_device_driver.sh Fri Nov 25 17:07:27 2011 (r227977)
+++ stable/8/share/examples/drivers/make_device_driver.sh Fri Nov 25 17:08:33 2011 (r227978)
@@ -261,7 +261,7 @@ static device_method_t ${1}_methods[] =
DEVMETHOD(device_probe, ${1}_isa_probe),
DEVMETHOD(device_attach, ${1}_isa_attach),
DEVMETHOD(device_detach, ${1}_isa_detach),
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t ${1}_isa_driver = {
Modified: stable/8/share/man/man9/driver.9
==============================================================================
--- stable/8/share/man/man9/driver.9 Fri Nov 25 17:07:27 2011 (r227977)
+++ stable/8/share/man/man9/driver.9 Fri Nov 25 17:08:33 2011 (r227978)
@@ -28,7 +28,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 3, 2010
+.Dd November 22, 2011
.Dt DRIVER 9
.Os
.Sh NAME
@@ -58,7 +58,7 @@ static device_method_t foo_methods[] = {
DEVMETHOD(bogo_twiddle, foo_twiddle),
/* Terminate method list */
- { 0, 0 }
+ DEVMETHOD_END
};
static driver_t foo_driver = {
Modified: stable/8/sys/sys/bus.h
==============================================================================
--- stable/8/sys/sys/bus.h Fri Nov 25 17:07:27 2011 (r227977)
+++ stable/8/sys/sys/bus.h Fri Nov 25 17:08:33 2011 (r227978)
@@ -549,9 +549,10 @@ extern int bus_current_pass;
void bus_set_pass(int pass);
/**
- * Shorthand for constructing method tables.
+ * Shorthands for constructing method tables.
*/
#define DEVMETHOD KOBJMETHOD
+#define DEVMETHOD_END KOBJMETHOD_END
/*
* Some common device interfaces.
More information about the svn-src-all
mailing list