Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/share/man/man9 Use device_private, not cast, to get at softc.



details:   https://anonhg.NetBSD.org/src/rev/cd5b8d46ab5d
branches:  trunk
changeset: 357586:cd5b8d46ab5d
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Thu Nov 16 18:40:28 2017 +0000

description:
Use device_private, not cast, to get at softc.

Someone^TM should turn this wall of prose into a nice itemized list
to make it clearer.

diffstat:

 share/man/man9/driver.9 |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (23 lines):

diff -r ebdfc5c7078b -r cd5b8d46ab5d share/man/man9/driver.9
--- a/share/man/man9/driver.9   Thu Nov 16 17:08:07 2017 +0000
+++ b/share/man/man9/driver.9   Thu Nov 16 18:40:28 2017 +0000
@@ -1,4 +1,4 @@
-.\"     $NetBSD: driver.9,v 1.30 2017/07/03 21:28:48 wiz Exp $
+.\"     $NetBSD: driver.9,v 1.31 2017/11/16 18:40:28 riastradh Exp $
 .\"
 .\" Copyright (c) 2001 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -234,9 +234,11 @@
 The second argument
 .Fa self
 is a pointer to the driver's device structure.
-It is also a pointer to our
+The device's
 .Em softc
-structure since the device structure is its first member.
+structure can be obtained from it using the
+.Xr device_private 9
+function.
 The third argument
 .Fa aux
 is a pointer to the attachment structure.



Home | Main Index | Thread Index | Old Index