gpio: davinci: Allocate the correct amount of memory for controller
authorAndrew F. Davis <afd@ti.com>
Fri, 31 Aug 2018 19:13:24 +0000 (14:13 -0500)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 20 Sep 2018 15:36:10 +0000 (08:36 -0700)
commitc809e37a3b5a889063ae737ff8b54705219d1ddc
tree14c6df1a83156a4e15e20355872aea2c85c87a82
parent587f7a694f016b65f8de8ea8b5fb0402712b5475
gpio: davinci: Allocate the correct amount of memory for controller

Previously we created a controller structure per bank of GPIO pins. This
has since been changed to one per controller, but the allocation size
was not changed. Fix this here.

This also leaves the variable 'nbank' unused, instead of removing it,
move it down and use it to clean up a loop. For loops with multiple
initializers and/or iteration expressions, especially ones that don't
use those loop counters are quite hard to follow, fix this.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Acked-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-davinci.c