Skip to content

Commit 023c437

Browse files
Colin Ian Kingdtor
authored andcommitted
Input: surface3_spi - make const array header static, reduces object code size
Don't populate the const array header on the stack, instead make it static. Makes the object code smaller by over 180 bytes: Before: text data bss dec hex filename 6003 1536 0 7539 1d73 surface3_spi.o After: text data bss dec hex filename 5726 1632 0 7358 1cbe surface3_spi.o Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 4a54fee commit 023c437

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/input/touchscreen/surface3_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ static void surface3_spi_process_pen(struct surface3_ts_data *ts_data, u8 *data)
173173

174174
static void surface3_spi_process(struct surface3_ts_data *ts_data)
175175
{
176-
const char header[] = {
176+
static const char header[] = {
177177
0xff, 0xff, 0xff, 0xff, 0xa5, 0x5a, 0xe7, 0x7e, 0x01
178178
};
179179
u8 *data = ts_data->rd_buf;

0 commit comments

Comments
 (0)