summaryrefslogtreecommitdiffstats
path: root/bsps/shared/grlib/drvmgr/get_resarray_count.c
blob: 7b5850d982d982f419ceec1898809e4bd08fd58c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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 <grlib/bspcommon.h>

int get_resarray_count(struct drvmgr_bus_res **array)
{
	int i = 0;
	while (array[i] != NULL)
		i++;
	return i;
}