Skip to content

Commit

Permalink
Input: byd - make array seq static, reduces object code size
Browse files Browse the repository at this point in the history
Don't populate the array seq on the stack, instead make it static.
Makes the object code smaller by over 1100 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
   6152	   1216	     64	   7432	   1d08	drivers/input/mouse/byd.o

After:
   text	   data	    bss	    dec	    hex	filename
   4974	   1280	     64	   6318	   18ae	drivers/input/mouse/byd.o

Signed-off-by: Colin Ian King <colin.king@canonical.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
  • Loading branch information
Colin Ian King authored and Dmitry Torokhov committed Sep 1, 2017
1 parent da1a42c commit 08d6ac9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/input/mouse/byd.c
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ static int byd_reset_touchpad(struct psmouse *psmouse)
u8 param[4];
size_t i;

const struct {
static const struct {
u16 command;
u8 arg;
} seq[] = {
Expand Down

0 comments on commit 08d6ac9

Please sign in to comment.