gpio: Convert gpio_is_valid to return bool
authorJoe Perches <joe@perches.com>
Tue, 10 May 2011 23:23:07 +0000 (16:23 -0700)
committerGrant Likely <grant.likely@secretlab.ca>
Fri, 27 May 2011 03:02:43 +0000 (21:02 -0600)
Make the code a bit more readable.

Instead of casting an int to an unsigned then comparing to
MAX_NR_GPIOS, add a >= 0 test and let the compiler optimizer
do the conversion to unsigned.

The generated code should be the same.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

No differences found