gpio: Remove VLA from stmpe driver
commit97fe7bef56e60ef6efa186348908b954a236b2fb
authorLaura Abbott <labbott@redhat.com>
Wed, 28 Mar 2018 17:59:57 +0000 (28 10:59 -0700)
committerLinus Walleij <linus.walleij@linaro.org>
Thu, 24 May 2018 08:22:21 +0000 (24 10:22 +0200)
tree09b82f5916758c672ce2d6ab61c6e0816efcb819
parent014e420d8ab5cc3cd8828a4ac2690048e1040754
gpio: Remove VLA from stmpe driver

The new challenge is to remove VLAs from the kernel
(see https://lkml.org/lkml/2018/3/7/621)

The number of GPIOs on the supported chips is fairly small
so stack allocate to a known upper bound and spit out a warning
if any new chips have more gpios.

Signed-off-by: Laura Abbott <labbott@redhat.com>
Reviewed-by: Phil Reid <preid@electromag.com.au>
Reviewed-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-stmpe.c