Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: winwing: constify read-only structs

These structs are never modified, so mark them as const.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20240804-hid-const-winwing-v1-1-5a6c714753b1@weissschuh.net
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>

authored by

Thomas Weißschuh and committed by
Benjamin Tissoires
c1f9eff7 e6de161b

+3 -3
+3 -3
drivers/hid/hid-winwing.c
··· 27 27 const char *led_name; 28 28 }; 29 29 30 - static struct winwing_led_info led_info[3] = { 30 + static const struct winwing_led_info led_info[3] = { 31 31 { 0, 255, "backlight" }, 32 32 { 1, 1, "a-a" }, 33 33 { 2, 1, "a-g" }, ··· 94 94 return -ENOMEM; 95 95 96 96 for (i = 0; i < 3; i += 1) { 97 - struct winwing_led_info *info = &led_info[i]; 97 + const struct winwing_led_info *info = &led_info[i]; 98 98 99 99 led = &data->leds[i]; 100 100 led->hdev = hdev; ··· 150 150 return ret; 151 151 } 152 152 153 - static __u8 original_rdesc_buttons[] = { 153 + static const __u8 original_rdesc_buttons[] = { 154 154 0x05, 0x09, 0x19, 0x01, 0x29, 0x6F, 155 155 0x15, 0x00, 0x25, 0x01, 0x35, 0x00, 156 156 0x45, 0x01, 0x75, 0x01, 0x95, 0x6F,