[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/52741: Wrong (oudated) information in driver(9)
>Synopsis: Wrong (oudated) information in driver(9)
>Arrival-Date: Mon Nov 20 10:05:00 +0000 2017
>Originator: Rocky Hotas
When dealing with the `attach' function:
"The first argument parent is a pointer to the driver's parent device structure. The second argument self is a pointer to the driver's device structure. It is also a pointer to our softc structure since the device structure is its first member".
The second statement is wrong: the `softc' struct is not the first member of the `device' struct; it is neither a member of the `device' struct. It can instead be obtained by calling `device_private(self)'.
Read the driver(9) manual.
The sentence "It is also a pointer to our softc structure since the device structure is its first member" should be removed, or modified according to the current code.
Main Index |
Thread Index |