“f5e706ad886b6a5eb59637830110b09ccebf01c5”上不存在“arch/sparc/include/asm/module.h”
提交 4f1b461d 编写于 作者: C Colin Ian King 提交者: Dmitry Torokhov

Input: elantech - make arrays debounce_packet static, reduces object code size

Don't populate the arrays debounce_packet on the stack, instead make
them static.  Makes the object code smaller by over 870 bytes:

Before:
   text	   data	    bss	    dec	    hex	filename
  30553	   9152	      0	  39705	   9b19	drivers/input/mouse/elantech.o

After:
   text	   data	    bss	    dec	    hex	filename
  29521	   9312	      0	  38833	   97b1	drivers/input/mouse/elantech.o
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Signed-off-by: NDmitry Torokhov <dmitry.torokhov@gmail.com>
上级 023c437a
...@@ -700,7 +700,9 @@ static int elantech_debounce_check_v2(struct psmouse *psmouse) ...@@ -700,7 +700,9 @@ static int elantech_debounce_check_v2(struct psmouse *psmouse)
* When we encounter packet that matches this exactly, it means the * When we encounter packet that matches this exactly, it means the
* hardware is in debounce status. Just ignore the whole packet. * hardware is in debounce status. Just ignore the whole packet.
*/ */
const u8 debounce_packet[] = { 0x84, 0xff, 0xff, 0x02, 0xff, 0xff }; static const u8 debounce_packet[] = {
0x84, 0xff, 0xff, 0x02, 0xff, 0xff
};
unsigned char *packet = psmouse->packet; unsigned char *packet = psmouse->packet;
return !memcmp(packet, debounce_packet, sizeof(debounce_packet)); return !memcmp(packet, debounce_packet, sizeof(debounce_packet));
...@@ -741,7 +743,9 @@ static int elantech_packet_check_v2(struct psmouse *psmouse) ...@@ -741,7 +743,9 @@ static int elantech_packet_check_v2(struct psmouse *psmouse)
static int elantech_packet_check_v3(struct psmouse *psmouse) static int elantech_packet_check_v3(struct psmouse *psmouse)
{ {
struct elantech_data *etd = psmouse->private; struct elantech_data *etd = psmouse->private;
const u8 debounce_packet[] = { 0xc4, 0xff, 0xff, 0x02, 0xff, 0xff }; static const u8 debounce_packet[] = {
0xc4, 0xff, 0xff, 0x02, 0xff, 0xff
};
unsigned char *packet = psmouse->packet; unsigned char *packet = psmouse->packet;
/* /*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册