Add macro to calculate number of elements in an array

This patch defines the ARRAY_SIZE macro for calculating number of elements
in an array and uses it where appropriate.

Change-Id: I72746a9229f0b259323972b498b9a3999731bc9b
diff --git a/drivers/io/io_fip.c b/drivers/io/io_fip.c
index 0cec804..9dcd901 100644
--- a/drivers/io/io_fip.c
+++ b/drivers/io/io_fip.c
@@ -143,7 +143,7 @@
 	int i;
 	int status = -EINVAL;
 
-	for (i = 0; i < (sizeof(name_uuid) / sizeof(name_uuid[0])); i++) {
+	for (i = 0; i < ARRAY_SIZE(name_uuid); i++) {
 		if (strcmp(filename, name_uuid[i].name) == 0) {
 			copy_uuid(uuid, &name_uuid[i].uuid);
 			status = 0;