Commit e66928af authored by Colin Ian King's avatar Colin Ian King Committed by Jiri Kosina

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: default avatarColin Ian King <colin.i.king@gmail.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
parent 79425b29
...@@ -985,7 +985,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev, ...@@ -985,7 +985,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
struct device *dev = led_cdev->dev->parent; struct device *dev = led_cdev->dev->parent;
struct hid_device *hdev = to_hid_device(dev); struct hid_device *hdev = to_hid_device(dev);
struct lenovo_drvdata *data_pointer = hid_get_drvdata(hdev); 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 led_nr = 0;
int ret = 0; int ret = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment