aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-09-04 12:17:39 -0400
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2017-09-04 12:28:15 -0400
commit1bf21b3373df2b5bfa3c6d2dcd52344c7ee4cc58 (patch)
tree79e6f18231f92cdbe62e97db2f30c6133fb7c881
parent08d6ac9ee5fedd82040bc878705981b67a116a3f (diff)
Input: adi - make array seq static, reduces object code size
Don't populate the array seq on the stack, instead make it static. Makes the object code smaller by over 170 bytes: Before: text data bss dec hex filename 13227 3232 0 16459 404b drivers/input/joystick/adi.o After: text data bss dec hex filename 12957 3328 0 16285 3f9d drivers/input/joystick/adi.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
-rw-r--r--drivers/input/joystick/adi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/joystick/adi.c b/drivers/input/joystick/adi.c
index d09cefa37931..15a71acb6997 100644
--- a/drivers/input/joystick/adi.c
+++ b/drivers/input/joystick/adi.c
@@ -313,7 +313,7 @@ static void adi_close(struct input_dev *dev)
313 313
314static void adi_init_digital(struct gameport *gameport) 314static void adi_init_digital(struct gameport *gameport)
315{ 315{
316 int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 }; 316 static const int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 };
317 int i; 317 int i;
318 318
319 for (i = 0; seq[i]; i++) { 319 for (i = 0; seq[i]; i++) {