Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Nov 2011 16:54:16 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r227974 - stable/8/share/man/man9
Message-ID:  <201111251654.pAPGsGWq051594@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Fri Nov 25 16:54:16 2011
New Revision: 227974
URL: http://svn.freebsd.org/changeset/base/227974

Log:
  MFC: r204602, r204650
  
  - Add missing includes to make example "compilable".
  - Use NULL for pointer arguments instead of 0.

Modified:
  stable/8/share/man/man9/driver.9
Directory Properties:
  stable/8/share/man/man9/   (props changed)

Modified: stable/8/share/man/man9/driver.9
==============================================================================
--- stable/8/share/man/man9/driver.9	Fri Nov 25 15:48:30 2011	(r227973)
+++ stable/8/share/man/man9/driver.9	Fri Nov 25 16:54:16 2011	(r227974)
@@ -28,7 +28,7 @@
 .\"
 .\" $FreeBSD$
 .\"
-.Dd June 16, 1998
+.Dd March 3, 2010
 .Dt DRIVER 9
 .Os
 .Sh NAME
@@ -37,7 +37,9 @@
 .Sh SYNOPSIS
 .Bd -literal
 #include <sys/param.h>
+#include <sys/kernel.h>
 #include <sys/bus.h>
+#include <sys/module.h>
 
 static int foo_probe(device_t);
 static int foo_attach(device_t);
@@ -59,7 +61,7 @@ static device_method_t foo_methods[] = {
 	{ 0, 0 }
 };
 
-static driver_t foo_driver {
+static driver_t foo_driver = {
 	"foo",
 	foo_methods,
 	sizeof(struct foo_softc)
@@ -67,7 +69,7 @@ static driver_t foo_driver {
 
 static devclass_t foo_devclass;
 
-DRIVER_MODULE(foo, bogo, foo_driver, foo_devclass, 0, 0);
+DRIVER_MODULE(foo, bogo, foo_driver, foo_devclass, NULL, NULL);
 .Ed
 .Sh DESCRIPTION
 Each driver in the kernel is described by a



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