Index: uspace/lib/c/include/macros.h
===================================================================
--- uspace/lib/c/include/macros.h	(revision 6326155bdae5f8b5856d725405ed6a588e23d79f)
+++ uspace/lib/c/include/macros.h	(revision 52f9c57a5dec91df8e7116909fe52919912afff5)
@@ -40,4 +40,5 @@
 #define abs(a)     ((a) >= 0 ? (a) : (-a))
 
+#define ARRAY_SIZE(array)   (sizeof(array) / sizeof(array[0]))
 
 #define KiB2SIZE(kb)  ((kb) << 10)
Index: uspace/lib/usb/src/usb.c
===================================================================
--- uspace/lib/usb/src/usb.c	(revision 6326155bdae5f8b5856d725405ed6a588e23d79f)
+++ uspace/lib/usb/src/usb.c	(revision 52f9c57a5dec91df8e7116909fe52919912afff5)
@@ -38,6 +38,5 @@
 #include <errno.h>
 #include <assert.h>
-
-#define ARR_SIZE(arr) (sizeof(arr)/sizeof(arr[0]))
+#include <macros.h>
 
 static const char *str_speed[] = {
@@ -74,5 +73,5 @@
 const char *usb_str_transfer_type(usb_transfer_type_t t)
 {
-	if (t >= ARR_SIZE(str_transfer_type)) {
+	if (t >= ARRAY_SIZE(str_transfer_type)) {
 		return "invalid";
 	}
@@ -87,5 +86,5 @@
 const char *usb_str_transfer_type_short(usb_transfer_type_t t)
 {
-	if (t >= ARR_SIZE(str_transfer_type_short)) {
+	if (t >= ARRAY_SIZE(str_transfer_type_short)) {
 		return "invl";
 	}
@@ -100,5 +99,5 @@
 const char *usb_str_direction(usb_direction_t d)
 {
-	if (d >= ARR_SIZE(str_direction)) {
+	if (d >= ARRAY_SIZE(str_direction)) {
 		return "invalid";
 	}
@@ -113,5 +112,5 @@
 const char *usb_str_speed(usb_speed_t s)
 {
-	if (s >= ARR_SIZE(str_speed)) {
+	if (s >= ARRAY_SIZE(str_speed)) {
 		return "invalid";
 	}
