提交 1bf21b33 编写于 作者: C Colin Ian King 提交者: Dmitry Torokhov

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: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 08d6ac9e
......@@ -313,7 +313,7 @@ static void adi_close(struct input_dev *dev)
static void adi_init_digital(struct gameport *gameport)
{
int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 };
static const int seq[] = { 4, -2, -3, 10, -6, -11, -7, -9, 11, 0 };
int i;
for (i = 0; seq[i]; i++) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册