summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-08-26 11:00:57 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2008-10-16 09:24:52 -0700
commit99178b036c97293a65004ff5ec5cff9f833aaecd (patch)
treec83ac6855710038ad9846f79b952b7fdcca528f8 /include
parent26853ab6f9a4c482be4b638477335704724d4854 (diff)
downloadop-kernel-dev-99178b036c97293a65004ff5ec5cff9f833aaecd.zip
op-kernel-dev-99178b036c97293a65004ff5ec5cff9f833aaecd.tar.gz
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 ec90e79f6a..987f591 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,
struct device_driver *start, void *data,
int (*fn)(struct device_driver *, void *));
+void bus_sort_breadthfirst(struct bus_type *bus,
+ int (*compare)(const struct device *a,
+ const struct device *b));
/*
* Bus notifiers: Get notified of addition/removal of devices
* and binding/unbinding of drivers to devices.
OpenPOWER on IntegriCloud