Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 22 Nov 2011 19:31:43 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227829 - in head: share/man/man9 sys/sys
Message-ID:  <201111221931.pAMJVhoe006179@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Tue Nov 22 19:31:43 2011
New Revision: 227829
URL: http://svn.freebsd.org/changeset/base/227829

Log:
  - 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 example in driver.9 to use DEVMETHOD_END.
  
  Submitted by:	jhb
  MFC after:	3 days

Modified:
  head/share/man/man9/driver.9
  head/sys/sys/bus.h

Modified: head/share/man/man9/driver.9
==============================================================================
--- head/share/man/man9/driver.9	Tue Nov 22 18:58:39 2011	(r227828)
+++ head/share/man/man9/driver.9	Tue Nov 22 19:31:43 2011	(r227829)
@@ -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: head/sys/sys/bus.h
==============================================================================
--- head/sys/sys/bus.h	Tue Nov 22 18:58:39 2011	(r227828)
+++ head/sys/sys/bus.h	Tue Nov 22 19:31:43 2011	(r227829)
@@ -571,9 +571,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.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111221931.pAMJVhoe006179>