]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/char/hvsi.c
[PATCH] drivers/char: Use ARRAY_SIZE macro
[linux-2.6-omap-h63xx.git] / drivers / char / hvsi.c
index a22aa940e01e15356e81164236853526c16bfb39..a9522189fc9efeaa82dab6d3b479df11d89a8412 100644 (file)
@@ -197,7 +197,7 @@ static inline void print_state(struct hvsi_struct *hp)
        };
        const char *name = state_names[hp->state];
 
-       if (hp->state > (sizeof(state_names)/sizeof(char*)))
+       if (hp->state > ARRAY_SIZE(state_names))
                name = "UNKNOWN";
 
        pr_debug("hvsi%i: state = %s\n", hp->index, name);