Skip to content
Commit e2843cb6 authored by Colin Ian King's avatar Colin Ian King Committed by Linus Walleij
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Signed-off-by: default avatarLinus Walleij <linus.walleij@linaro.org>
parent deb2e713
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment