Skip to content

Commit a96a8a5

Browse files
Colin Ian KingJiri Kosina
authored andcommitted
HID: logitech-hidpp: HID: make const array consumer_rdesc_start static
Don't populate the array consumer_rdesc_start on the stack but instead make it static. Makes the object code smaller by 88 bytes. Before: text data bss dec hex filename 59155 9840 448 69443 10f43 drivers/hid/hid-logitech-hidpp.o After: text data bss dec hex filename 59003 9904 448 69355 10eeb drivers/hid/hid-logitech-hidpp.o (gcc version 8.3.0, amd64) Signed-off-by: Colin Ian King <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 39d21e7 commit a96a8a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-logitech-hidpp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2862,7 +2862,7 @@ static u8 *hidpp10_consumer_keys_report_fixup(struct hidpp_device *hidpp,
28622862
u8 *_rdesc, unsigned int *rsize)
28632863
{
28642864
/* Note 0 terminated so we can use strnstr to search for this. */
2865-
const char consumer_rdesc_start[] = {
2865+
static const char consumer_rdesc_start[] = {
28662866
0x05, 0x0C, /* USAGE_PAGE (Consumer Devices) */
28672867
0x09, 0x01, /* USAGE (Consumer Control) */
28682868
0xA1, 0x01, /* COLLECTION (Application) */

0 commit comments

Comments
 (0)