[PATCH 02/10] sh-pfc: Terminate gpios array by -1
Linus Walleij
linus.walleij at linaro.org
Thu Dec 12 14:36:32 EST 2013
On Wed, Dec 11, 2013 at 4:26 AM, Laurent Pinchart
<laurent.pinchart+renesas at ideasonboard.com> wrote:
> 0 is a valid GPIO value, use -1 to terminate the gpios array in IRQ
> lists.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas at ideasonboard.com>
Patch applied.
Another solution to the same problem: terminate with
USHRT_MAX and for (k = 0; gpios[k] != USHRT_MAX; k++) {}
but this works too...
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list