diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-06-16 05:44:18 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-08-05 16:53:33 -0400 |
commit | cc7447a5fa92759b0856d6a83ba2539c6a94e67e (patch) | |
tree | 18539a44c9767e90eea18f532509b8222b0a750d /include/linux/device.h | |
parent | ed1d218c95c6846416ddb39085b20a5b3c0872e4 (diff) |
Driver core: Drop __must_check from bus_for_each_drv()
There is little rationale for marking bus_for_each_drv() __must_check.
It is more of an iteration helper than a real function. You don't know
in advance which callback it will be used on, so you have no clue how
important it can be to check the returned value. In practice, this
helper function can be used for best-effort tasks.
As a matter of fact, bus_for_each_dev() is not marked __must_check.
So remove it from bus_for_each_drv() as well. This is the same that
was done back in October 2006 by Russell King for
device_for_each_child(), for exactly the same reasons.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r-- | include/linux/device.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 6a8276f683b6..ddffdf7da393 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -84,9 +84,8 @@ struct device *bus_find_device_by_name(struct bus_type *bus, | |||
84 | struct device *start, | 84 | struct device *start, |
85 | const char *name); | 85 | const char *name); |
86 | 86 | ||
87 | int __must_check bus_for_each_drv(struct bus_type *bus, | 87 | int bus_for_each_drv(struct bus_type *bus, struct device_driver *start, |
88 | struct device_driver *start, void *data, | 88 | void *data, int (*fn)(struct device_driver *, void *)); |
89 | int (*fn)(struct device_driver *, void *)); | ||
90 | 89 | ||
91 | void bus_sort_breadthfirst(struct bus_type *bus, | 90 | void bus_sort_breadthfirst(struct bus_type *bus, |
92 | int (*compare)(const struct device *a, | 91 | int (*compare)(const struct device *a, |