Commit eef4e251 authored by Patrick Mochel's avatar Patrick Mochel

driver model: update documentation.

From Art Haas.
parent 9552d6bc
......@@ -32,8 +32,8 @@ object of this type. They must initialize the name field, and may
optionally initialize the match callback.
struct bus_type pci_bus_type = {
name: "pci",
match: pci_bus_match,
.name = "pci",
.match = pci_bus_match,
};
The structure should be exported to drivers in a header file:
......
......@@ -49,14 +49,14 @@ driver. This declaration is hypothetical only; it relies on the driver
being converted completely to the new model.
static struct device_driver eepro100_driver = {
name: "eepro100",
bus: &pci_bus_type,
devclass: &ethernet_devclass, /* when it's implemented */
.name = "eepro100",
.bus = &pci_bus_type,
.devclass = &ethernet_devclass, /* when it's implemented */
probe: eepro100_probe,
remove: eepro100_remove,
suspend: eepro100_suspend,
resume: eepro100_resume,
.probe = eepro100_probe,
.remove = eepro100_remove,
.suspend = eepro100_suspend,
.resume = eepro100_resume,
};
Most drivers will not be able to be converted completely to the new
......@@ -81,15 +81,15 @@ A definition that included bus-specific fields would look something
like (using the eepro100 driver again):
static struct pci_driver eepro100_driver = {
id_table: eepro100_pci_tbl,
driver: {
name: "eepro100",
bus: &pci_bus_type,
devclass: &ethernet_devclass, /* when it's implemented */
probe: eepro100_probe,
remove: eepro100_remove,
suspend: eepro100_suspend,
resume: eepro100_resume,
.id_table = eepro100_pci_tbl,
.driver = {
.name = "eepro100",
.bus = &pci_bus_type,
.devclass = &ethernet_devclass, /* when it's implemented */
.probe = eepro100_probe,
.remove = eepro100_remove,
.suspend = eepro100_suspend,
.resume = eepro100_resume,
},
};
......
......@@ -86,11 +86,11 @@ whole sysfs filesystem anywhere in userspace.
This can be done permanently by providing the following entry into the
/etc/fstab (under the provision that the mount point does exist, of course):
none /devices sysfs defaults 0 0
none /sys sysfs defaults 0 0
Or by hand on the command line:
~: mount -t sysfs none /devices
# mount -t sysfs sysfs /devices
Whenever a device is inserted into the tree, a directory is created for it.
This directory may be populated at each layer of discovery - the global layer,
......
......@@ -271,8 +271,8 @@ for devices on that particular bus (this assmumes that drivers do not
span multiple bus types).
More information can device-model specific features can be found in
Documentation/device-model/.
More information can driver-model specific features can be found in
Documentation/driver-model/.
TODO: Finish this section.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment