svn commit: r227976 - in stable/9: share/examples/drivers
share/man/man9 sys/sys
Marius Strobl
marius at FreeBSD.org
Fri Nov 25 17:06:32 UTC 2011
Author: marius
Date: Fri Nov 25 17:06:32 2011
New Revision: 227976
URL: http://svn.freebsd.org/changeset/base/227976
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
Approved by: re (kib)
Modified:
stable/9/share/examples/drivers/make_device_driver.sh
stable/9/share/man/man9/driver.9
stable/9/sys/sys/bus.h
Directory Properties:
stable/9/share/examples/ (props changed)
stable/9/share/man/man9/ (props changed)
stable/9/sys/ (props changed)
stable/9/sys/amd64/include/xen/ (props changed)
stable/9/sys/boot/ (props changed)
stable/9/sys/boot/i386/efi/ (props changed)
stable/9/sys/boot/ia64/efi/ (props changed)
stable/9/sys/boot/ia64/ski/ (props changed)
stable/9/sys/boot/powerpc/boot1.chrp/ (props changed)
stable/9/sys/boot/powerpc/ofw/ (props changed)
stable/9/sys/cddl/contrib/opensolaris/ (props changed)
stable/9/sys/conf/ (props changed)
stable/9/sys/contrib/dev/acpica/ (props changed)
stable/9/sys/contrib/octeon-sdk/ (props changed)
stable/9/sys/contrib/pf/ (props changed)
stable/9/sys/contrib/x86emu/ (props changed)
Modified: stable/9/share/examples/drivers/make_device_driver.sh
==============================================================================
--- stable/9/share/examples/drivers/make_device_driver.sh Fri Nov 25 16:54:18 2011 (r227975)
+++ stable/9/share/examples/drivers/make_device_driver.sh Fri Nov 25 17:06:32 2011 (r227976)
@@ -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/9/share/man/man9/driver.9
==============================================================================
--- stable/9/share/man/man9/driver.9 Fri Nov 25 16:54:18 2011 (r227975)
+++ stable/9/share/man/man9/driver.9 Fri Nov 25 17:06:32 2011 (r227976)
@@ -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/9/sys/sys/bus.h
==============================================================================
--- stable/9/sys/sys/bus.h Fri Nov 25 16:54:18 2011 (r227975)
+++ stable/9/sys/sys/bus.h Fri Nov 25 17:06:32 2011 (r227976)
@@ -570,9 +570,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-stable-9
mailing list