Skip to content

Commit e66928a

Browse files
ColinIanKingJiri Kosina
authored andcommitted
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 <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 79425b2 commit e66928a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/hid-lenovo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -985,7 +985,7 @@ static int lenovo_led_brightness_set(struct led_classdev *led_cdev,
985985
struct device *dev = led_cdev->dev->parent;
986986
struct hid_device *hdev = to_hid_device(dev);
987987
struct lenovo_drvdata *data_pointer = hid_get_drvdata(hdev);
988-
u8 tp10ubkbd_led[] = { TP10UBKBD_MUTE_LED, TP10UBKBD_MICMUTE_LED };
988+
static const u8 tp10ubkbd_led[] = { TP10UBKBD_MUTE_LED, TP10UBKBD_MICMUTE_LED };
989989
int led_nr = 0;
990990
int ret = 0;
991991

0 commit comments

Comments
 (0)