summaryrefslogtreecommitdiffstats
path: root/cpukit/libpci/pci_for_each_dev.c
diff options
context:
space:
mode:
Diffstat (limited to 'cpukit/libpci/pci_for_each_dev.c')
-rw-r--r--cpukit/libpci/pci_for_each_dev.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/cpukit/libpci/pci_for_each_dev.c b/cpukit/libpci/pci_for_each_dev.c
new file mode 100644
index 0000000000..c2b3934fdc
--- /dev/null
+++ b/cpukit/libpci/pci_for_each_dev.c
@@ -0,0 +1,18 @@
+/* PCI Help function, iterate all PCI devices.
+ *
+ * COPYRIGHT (c) 2010.
+ * Cobham Gaisler AB.
+ *
+ * The license and distribution terms for this file may be
+ * found in the file LICENSE in this distribution or at
+ * http://www.rtems.com/license/LICENSE.
+ */
+
+#include <pci/cfg.h>
+
+int pci_for_each_dev(
+ int (*func)(struct pci_dev *, void *arg),
+ void *arg)
+{
+ return pci_for_each_child(&pci_hb, func, arg, SEARCH_DEPTH);
+}