aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-26 12:00:57 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 12:24:52 -0400
commit99178b036c97293a65004ff5ec5cff9f833aaecd (patch)
treec83ac6855710038ad9846f79b952b7fdcca528f8 /include
parent26853ab6f9a4c482be4b638477335704724d4854 (diff)
Driver core: add bus_sort_breadthfirst() function
The PCI core wants to reorder the devices in the bus list. So move this functionality out of the pci core and into the driver core so that anyone else can also do this if needed. This also lets us change how struct device is attached to drivers in the future without messing with the PCI core. Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include')
-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 ec90e79f6a00..987f5912720a 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -90,6 +90,9 @@ int __must_check bus_for_each_drv(struct bus_type *bus,
90 struct device_driver *start, void *data, 90 struct device_driver *start, void *data,
91 int (*fn)(struct device_driver *, void *)); 91 int (*fn)(struct device_driver *, void *));
92 92
93void bus_sort_breadthfirst(struct bus_type *bus,
94 int (*compare)(const struct device *a,
95 const struct device *b));
93/* 96/*
94 * Bus notifiers: Get notified of addition/removal of devices 97 * Bus notifiers: Get notified of addition/removal of devices
95 * and binding/unbinding of drivers to devices. 98 * and binding/unbinding of drivers to devices.