infiniband-diags/ibstat.c: Use UMAD_MAX_DEVICES define

Signed-off-by: Hal Rosenstock <hal.rosenstock@gmail.com>

diff --git a/infiniband-diags/src/ibstat.c b/infiniband-diags/src/ibstat.c
index fe336e8..600a657 100644
--- a/infiniband-diags/src/ibstat.c
+++ b/infiniband-diags/src/ibstat.c
@@ -65,8 +65,6 @@
 
 static int debug;
 
-#define MAX_DEVICES 20
-
 char *argv0 = "ibstat";
 
 static char *node_type_str[] = {
@@ -203,7 +201,7 @@ usage(void)
 int
 main(int argc, char *argv[])
 {
-	char names[MAX_DEVICES][UMAD_CA_NAME_LEN];
+	char names[UMAD_MAX_DEVICES][UMAD_CA_NAME_LEN];
 	int dev_port = -1;
 	int list_only = 0, short_format = 0, list_ports = 0;
 	int n, i;
@@ -256,7 +254,7 @@ main(int argc, char *argv[])
 	if (umad_init() < 0)
 		IBPANIC("can't init UMAD library");
 
-	if ((n = umad_get_cas_names(names, MAX_DEVICES)) < 0)
+	if ((n = umad_get_cas_names(names, UMAD_MAX_DEVICES)) < 0)
 		IBPANIC("can't list IB device names");
 
 	if (argc) {
