diff options
author | Colin Ian King <colin.i.king@gmail.com> | 2022-10-05 17:42:16 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2022-10-18 14:43:59 +0200 |
commit | e66928af3667a9d844a674976ba7765757ab68e2 (patch) | |
tree | ec4b9e8db61176f208bd455a6a4b29a6c6d4ef31 | |
parent | HID: saitek: add madcatz variant of MMO7 mouse device ID (diff) | |
download | linux-e66928af3667a9d844a674976ba7765757ab68e2.tar.xz linux-e66928af3667a9d844a674976ba7765757ab68e2.zip |
HID: lenovo: Make array tp10ubkbd_led static const
Don't populate the read-only array tp10ubkbd_led on the stack but instead
make it static const. Also makes the object code a little smaller.
Signed-off-by: Colin Ian King <colin.i.king@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
-rw-r--r-- | drivers/hid/hid-lenovo.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/hid/hid-lenovo.c b/drivers/hid/hid-lenovo.c index 9dabd6323234..44763c0da444 100644 --- a/drivers/hid/hid-lenovo.c +++ b/drivers/hid/hid-lenovo.c @@ -985,7 +985,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev, struct device *dev = led_cdev->dev->parent; struct hid_device *hdev = to_hid_device(dev); struct lenovo_drvdata *data_pointer = hid_get_drvdata(hdev); - u8 tp10ubkbd_led[] = { TP10UBKBD_MUTE_LED, TP10UBKBD_MICMUTE_LED }; + static const u8 tp10ubkbd_led[] = { TP10UBKBD_MUTE_LED, TP10UBKBD_MICMUTE_LED }; int led_nr = 0; int ret = 0; |