aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-logitech-hidpp.c
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2019-05-10 14:17:22 +0100
committerJiri Kosina <jkosina@suse.cz>2019-05-22 13:18:44 +0200
commita96a8a576bf5cc45534d0079d7006fc3fe25282b (patch)
treee97568ca9e5943472555cf12dde82dbb16792634 /drivers/hid/hid-logitech-hidpp.c
parentHID: logitech-dj: make const array template static (diff)
downloadlinux-dev-a96a8a576bf5cc45534d0079d7006fc3fe25282b.tar.xz
linux-dev-a96a8a576bf5cc45534d0079d7006fc3fe25282b.zip
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 <colin.king@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-logitech-hidpp.c')
-rw-r--r--drivers/hid/hid-logitech-hidpp.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c
index 72fc9c0566db..df960491e473 100644
--- a/drivers/hid/hid-logitech-hidpp.c
+++ b/drivers/hid/hid-logitech-hidpp.c
@@ -2862,7 +2862,7 @@ static u8 *hidpp10_consumer_keys_report_fixup(struct hidpp_device *hidpp,
u8 *_rdesc, unsigned int *rsize)
{
/* Note 0 terminated so we can use strnstr to search for this. */
- const char consumer_rdesc_start[] = {
+ static const char consumer_rdesc_start[] = {
0x05, 0x0C, /* USAGE_PAGE (Consumer Devices) */
0x09, 0x01, /* USAGE (Consumer Control) */
0xA1, 0x01, /* COLLECTION (Application) */