summaryrefslogtreecommitdiffstats
path: root/include/linux/device.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-01-27 10:29:20 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2008-01-27 15:01:39 -0800
commit1f9ffc049d7a88c8489b883b6fc0a25185062002 (patch)
tree0dddb114d2de5f380ab055c039da0549adb42b12 /include/linux/device.h
parent123ca9575b1f5342c05a4b84d6af8ba7587c2981 (diff)
downloadlinux-1f9ffc049d7a88c8489b883b6fc0a25185062002.tar.gz
linux-1f9ffc049d7a88c8489b883b6fc0a25185062002.tar.bz2
linux-1f9ffc049d7a88c8489b883b6fc0a25185062002.zip
Driver core: add bus_find_device_by_name function
The driver core, and some other parts of the kernel just want to find a device based on a name for a specific bus. Give them a simple wrapper to prevent them from having to always roll their own. This will be used in the PPC patch later in this series. Cc: Paul Mackerras <paulus@samba.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/device.h')
-rw-r--r--include/linux/device.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/device.h b/include/linux/device.h
index 1880208964d6..db375be333c7 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -84,6 +84,9 @@ int bus_for_each_dev(struct bus_type *bus, struct device *start, void *data,
struct device *bus_find_device(struct bus_type *bus, struct device *start,
void *data,
int (*match)(struct device *dev, void *data));
+struct device *bus_find_device_by_name(struct bus_type *bus,
+ struct device *start,
+ const char *name);
int __must_check bus_for_each_drv(struct bus_type *bus,
struct device_driver *start, void *data,