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 ...@@ -32,8 +32,8 @@ object of this type. They must initialize the name field, and may
optionally initialize the match callback. optionally initialize the match callback.
struct bus_type pci_bus_type = { struct bus_type pci_bus_type = {
name: "pci", .name = "pci",
match: pci_bus_match, .match = pci_bus_match,
}; };
The structure should be exported to drivers in a header file: 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 ...@@ -49,14 +49,14 @@ driver. This declaration is hypothetical only; it relies on the driver
being converted completely to the new model. being converted completely to the new model.
static struct device_driver eepro100_driver = { static struct device_driver eepro100_driver = {
name: "eepro100", .name = "eepro100",
bus: &pci_bus_type, .bus = &pci_bus_type,
devclass: &ethernet_devclass, /* when it's implemented */ .devclass = &ethernet_devclass, /* when it's implemented */
probe: eepro100_probe, .probe = eepro100_probe,
remove: eepro100_remove, .remove = eepro100_remove,
suspend: eepro100_suspend, .suspend = eepro100_suspend,
resume: eepro100_resume, .resume = eepro100_resume,
}; };
Most drivers will not be able to be converted completely to the new 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 ...@@ -81,15 +81,15 @@ A definition that included bus-specific fields would look something
like (using the eepro100 driver again): like (using the eepro100 driver again):
static struct pci_driver eepro100_driver = { static struct pci_driver eepro100_driver = {
id_table: eepro100_pci_tbl, .id_table = eepro100_pci_tbl,
driver: { .driver = {
name: "eepro100", .name = "eepro100",
bus: &pci_bus_type, .bus = &pci_bus_type,
devclass: &ethernet_devclass, /* when it's implemented */ .devclass = &ethernet_devclass, /* when it's implemented */
probe: eepro100_probe, .probe = eepro100_probe,
remove: eepro100_remove, .remove = eepro100_remove,
suspend: eepro100_suspend, .suspend = eepro100_suspend,
resume: eepro100_resume, .resume = eepro100_resume,
}, },
}; };
......
...@@ -86,11 +86,11 @@ whole sysfs filesystem anywhere in userspace. ...@@ -86,11 +86,11 @@ whole sysfs filesystem anywhere in userspace.
This can be done permanently by providing the following entry into the 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): /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: 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. 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, 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 ...@@ -271,8 +271,8 @@ for devices on that particular bus (this assmumes that drivers do not
span multiple bus types). span multiple bus types).
More information can device-model specific features can be found in More information can driver-model specific features can be found in
Documentation/device-model/. Documentation/driver-model/.
TODO: Finish this section. 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