]> git.baikalelectronics.ru Git - kernel.git/commit
gpio: gpio-stmpe: make various char arrays static const, shrinks object size
authorColin Ian King <colin.king@canonical.com>
Tue, 28 Nov 2017 18:23:39 +0000 (18:23 +0000)
committerLinus Walleij <linus.walleij@linaro.org>
Sat, 2 Dec 2017 21:42:33 +0000 (22:42 +0100)
commit2215cda1f8d4f3b683390b0ec496d6afa9b05dc7
tree19a4a01fe75ccad32edaeb4244f1c153c92c0cca
parent7f1cabe15a23db535fe8a233e01cfb0ae5588b77
gpio: gpio-stmpe: make various char arrays static const, shrinks object size

Don't populate the read-only arrays edge_det_values, rise_values and
fall_values on the stack but instead make them static and constify them.
Makes the object code smaller by over 240 bytes:

Before:
   text    data     bss     dec     hex filename
   9525    2520     192   12237    2fcd drivers/gpio/gpio-stmpe.o

After:
   text    data     bss     dec     hex filename
   9025    2776     192   11993    2ed9 drivers/gpio/gpio-stmpe.o

(gcc version 7.2.0 x86_64)

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpio-stmpe.c