diff options
author | jhb <jhb@FreeBSD.org> | 2005-10-13 16:57:53 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2005-10-13 16:57:53 +0000 |
commit | 2c3cb767e45685b164e60f5a6f9cf19b267e11aa (patch) | |
tree | f6b397989d5147607f288ac968f5c26742f50e70 /share | |
parent | 7ea85920a1f3ece0fe2095eab4ef33c2cd0cf271 (diff) | |
download | FreeBSD-src-2c3cb767e45685b164e60f5a6f9cf19b267e11aa.zip FreeBSD-src-2c3cb767e45685b164e60f5a6f9cf19b267e11aa.tar.gz |
- Clarify when the softc is allocated. It is allocated when a device is
probed and attached, not on the first call to device_get_softc().
- Add a cross reference to DEVICE_PROBE regarding the caveats of using the
softc in a driver's probe routine.
- Fix a grammar bogon.
PR: docs/87176 (1)
Submitted by: Devon H. O'Dell dodell at offmyserver dot com (1)
MFC after: 3 days
Diffstat (limited to 'share')
-rw-r--r-- | share/man/man9/device_get_softc.9 | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/share/man/man9/device_get_softc.9 b/share/man/man9/device_get_softc.9 index e218115..a31c5be 100644 --- a/share/man/man9/device_get_softc.9 +++ b/share/man/man9/device_get_softc.9 @@ -42,8 +42,11 @@ .Sh DESCRIPTION Return the driver-specific state of .Fa dev . -The softc is automatically allocated and zeroed the first -time it is requested. +The softc is automatically allocated and zeroed when the device is +attached. +The softc is also initialized and present when a device is probed, +but is subject to caveats as described in +.Xr DEVICE_PROBE 9 . The size of the allocation is determined by the device's .Vt driver_t information used to define the driver. @@ -53,10 +56,11 @@ device. Driver writers are discouraged from using their own softc management mechanisms. Driver writers should not copy such mechanisms found in drivers in the -tree that predates this function. +tree that predate this function. .Sh RETURN VALUES The pointer to the driver-specific instance variable is returned. .Sh SEE ALSO +.Xr DEVICE_PROBE 9 , .Xr device 9 , .Xr device_set_softc 9 , .Xr driver 9 |