Documentation/driver-model/bus.txt:2: ERROR: trailing whitespace Documentation/driver-model/bus.txt:19: ERROR: trailing whitespace Documentation/driver-model/bus.txt:50: ERROR: trailing whitespace Documentation/driver-model/bus.txt:51: ERROR: trailing whitespace Documentation/driver-model/bus.txt:63: ERROR: trailing whitespace Documentation/driver-model/bus.txt:69: ERROR: trailing whitespace Documentation/driver-model/bus.txt:73: ERROR: trailing whitespace Documentation/driver-model/bus.txt:84: ERROR: trailing whitespace Documentation/driver-model/bus.txt:91: ERROR: trailing whitespace Documentation/driver-model/bus.txt:99: ERROR: trailing whitespace Documentation/driver-model/bus.txt:145: ERROR: trailing whitespace Signed-off-by: Andrea Gelmini <andrea.gelmini@xxxxxxxxx> --- Documentation/driver-model/bus.txt | 23 +++++++++++------------ 1 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Documentation/driver-model/bus.txt b/Documentation/driver-model/bus.txt index 5001b75..a1104b1 100644 --- a/Documentation/driver-model/bus.txt +++ b/Documentation/driver-model/bus.txt @@ -1,5 +1,4 @@ - -Bus Types +Bus Types Definition ~~~~~~~~~~ @@ -16,7 +15,7 @@ struct bus_type { struct driver_attribute * drv_attrs; int (*match)(struct device * dev, struct device_driver * drv); - int (*hotplug) (struct device *dev, char **envp, + int (*hotplug) (struct device *dev, char **envp, int num_envp, char *buffer, int buffer_size); int (*suspend)(struct device * dev, pm_message_t state); int (*resume)(struct device * dev); @@ -47,8 +46,8 @@ Registration When a bus driver is initialized, it calls bus_register. This initializes the rest of the fields in the bus object and inserts it -into a global list of bus types. Once the bus object is registered, -the fields in it are usable by the bus driver. +into a global list of bus types. Once the bus object is registered, +the fields in it are usable by the bus driver. Callbacks @@ -60,17 +59,17 @@ match(): Attaching Drivers to Devices The format of device ID structures and the semantics for comparing them are inherently bus-specific. Drivers typically declare an array of device IDs of devices they support that reside in a bus-specific -driver structure. +driver structure. The purpose of the match callback is provide the bus an opportunity to determine if a particular driver supports a particular device by comparing the device IDs the driver supports with the device ID of a particular device, without sacrificing bus-specific functionality or -type-safety. +type-safety. When a driver is registered with the bus, the bus's list of devices is iterated over, and the match callback is called for each device that -does not have a driver associated with it. +does not have a driver associated with it. @@ -81,14 +80,14 @@ The lists of devices and drivers are intended to replace the local lists that many buses keep. They are lists of struct devices and struct device_drivers, respectively. Bus drivers are free to use the lists as they please, but conversion to the bus-specific type may be -necessary. +necessary. The LDM core provides helper functions for iterating over each list. int bus_for_each_dev(struct bus_type * bus, struct device * start, void * data, int (*fn)(struct device *, void *)); -int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, +int bus_for_each_drv(struct bus_type * bus, struct device_driver * start, void * data, int (*fn)(struct device_driver *, void *)); These helpers iterate over the respective list, and call the callback @@ -96,7 +95,7 @@ for each device or driver in the list. All list accesses are synchronized by taking the bus's lock (read currently). The reference count on each object in the list is incremented before the callback is called; it is decremented after the next object has been obtained. The -lock is not held when calling the callback. +lock is not held when calling the callback. sysfs @@ -142,7 +141,7 @@ struct bus_attribute { }; Bus drivers can export attributes using the BUS_ATTR macro that works -similarly to the DEVICE_ATTR macro for devices. For example, a definition +similarly to the DEVICE_ATTR macro for devices. For example, a definition like this: static BUS_ATTR(debug,0644,show_debug,store_debug); -- 1.7.1.251.gf80a2 -- To unsubscribe from this list: send the line "unsubscribe linux-doc" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html