summaryrefslogtreecommitdiffstats
path: root/bsps/sparc/shared/drvmgr/get_resarray_count.c
diff options
context:
space:
mode:
Diffstat (limited to 'bsps/sparc/shared/drvmgr/get_resarray_count.c')
-rw-r--r--bsps/sparc/shared/drvmgr/get_resarray_count.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/bsps/sparc/shared/drvmgr/get_resarray_count.c b/bsps/sparc/shared/drvmgr/get_resarray_count.c
new file mode 100644
index 0000000000..4099fa6b0d
--- /dev/null
+++ b/bsps/sparc/shared/drvmgr/get_resarray_count.c
@@ -0,0 +1,20 @@
+/* Common driver configuration routines.
+ *
+ * COPYRIGHT (c) 2015.
+ * Cobham Gaisler.
+ *
+ * The license and distribution terms for this file may be
+ * found in found in the file LICENSE in this distribution or at
+ * http://www.rtems.org/license/LICENSE.
+ */
+
+#include <stdlib.h>
+#include <drvmgr/bspcommon.h>
+
+int get_resarray_count(struct drvmgr_bus_res **array)
+{
+ int i = 0;
+ while (array[i] != NULL)
+ i++;
+ return i;
+}