summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c')
-rw-r--r--c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c39
1 files changed, 0 insertions, 39 deletions
diff --git a/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c b/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
deleted file mode 100644
index 6b2d28824c..0000000000
--- a/c/src/lib/libbsp/sparc/shared/amba/ambapp_find_by_idx.c
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * AMBA Plug & Play routines
- *
- * COPYRIGHT (c) 2011
- * Aeroflex Gaisler
- *
- * The license and distribution terms for this file may be
- * found in the file LICENSE in this distribution or at
- * http://www.rtems.org/license/LICENSE.
- */
-
-#include <ambapp.h>
-
-/* AMBAPP helper routine to find a device by index. The function is given to
- * ambapp_for_each, the argument may be NULL (find first device) or a pointer
- * to a index which is downcounted until 0 is reached. If the int-pointer
- * points to a value of:
- * 0 - first device is returned
- * 1 - second device is returned
- * ...
- *
- * The matching device is returned, which will stop the ambapp_for_each search.
- * If zero is returned from ambapp_for_each no device matching the index was
- * found
- */
-int ambapp_find_by_idx(struct ambapp_dev *dev, int index, void *pcount)
-{
- int *pi = pcount;
-
- if (pi) {
- if ((*pi)-- == 0)
- return (int)dev;
- else
- return 0;
- } else {
- /* Satisfied with first matching device, stop search */
- return (int)dev;
- }
-}