summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjonb <jonb@NetBSD.org>2003-01-07 17:13:07 +0000
committerjonb <jonb@NetBSD.org>2003-01-07 17:13:07 +0000
commit17f2be3d4e5ca9627208c42e885eabc139be623c (patch)
treea048fddce4e91e6ddae701420a90dfd3fcf28eae
parent078d3d03c931725c32ba0b8dd40ac0b6b4f3c6d2 (diff)
describe the CFATTACH decl macro, rather than defining struct cfattach
-rw-r--r--share/man/man9/driver.920
1 files changed, 6 insertions, 14 deletions
diff --git a/share/man/man9/driver.9 b/share/man/man9/driver.9
index 84532e9bb1e..21574478b47 100644
--- a/share/man/man9/driver.9
+++ b/share/man/man9/driver.9
@@ -1,4 +1,4 @@
-.\" $NetBSD: driver.9,v 1.9 2002/10/14 13:43:22 wiz Exp $
+.\" $NetBSD: driver.9,v 1.10 2003/01/07 17:13:07 jonb Exp $
.\"
.\" Copyright (c) 2001 The NetBSD Foundation, Inc.
.\" All rights reserved.
@@ -71,28 +71,20 @@ For example, the interface to driver
is defined with:
.Pp
.Bd -literal
-struct cfattach foo_ca = {
+CFATTACH_DECL(foo, /* driver name */
sizeof(struct foo_softc), /* size of instance data */
foo_match, /* match/probe function */
foo_attach, /* attach function */
foo_detach, /* detach function */
- foo_activate /* activate function */
-};
+ foo_activate); /* activate function */
.Ed
.Pp
-The structure variable must be named
-.Va foo_ca
-by appending the letters
-.Dq _ca
-to the driver's base name.
-This convention is mandated by the autoconfiguration framework.
-.Pp
For each device instance controlled by the driver, the
autoconfiguration framework allocates a block of memory to record
device-instance-specific driver variables.
-The size of this memory block is specified by the first field in the
-.Em cfattach
-structure.
+The size of this memory block is specified by the second argument in the
+.Em CFATTACH_DECL
+macro.
The memory block is referred to as the driver's
.Em softc
structure.