summaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2021-02-04 18:27:48 +0100
committerJiri Kosina <jkosina@suse.cz>2021-02-05 10:13:28 +0100
commit4d30083301488199a9cef4ffa6ff15149474ebca (patch)
tree958c193ccc8a64cd3c30a44200695653512c6757 /drivers/hid
parentHID: logitech-hidpp: add support for Unified Battery (1004) feature (diff)
downloadlinux-4d30083301488199a9cef4ffa6ff15149474ebca.tar.xz
linux-4d30083301488199a9cef4ffa6ff15149474ebca.zip
HID: lg-g15: make a const array static, makes object smaller
Don't populate the const array led_names on the stack but instead make it static. Makes the object code smaller by 79 bytes: Before: text data bss dec hex filename 19686 7952 256 27894 6cf6 drivers/hid/hid-lg-g15.o After: text data bss dec hex filename 19543 8016 256 27815 6ca7 drivers/hid/hid-lg-g15.o (gcc version 10.2.0) Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-lg-g15.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-lg-g15.c b/drivers/hid/hid-lg-g15.c
index fcaf8466e627..bfbba0d41933 100644
--- a/drivers/hid/hid-lg-g15.c
+++ b/drivers/hid/hid-lg-g15.c
@@ -647,7 +647,7 @@ static void lg_g15_input_close(struct input_dev *dev)
static int lg_g15_register_led(struct lg_g15_data *g15, int i)
{
- const char * const led_names[] = {
+ static const char * const led_names[] = {
"g15::kbd_backlight",
"g15::lcd_backlight",
"g15::macro_preset1",