Skip to content

Commit c1f9eff

Browse files
t-8chBenjamin Tissoires
authored andcommitted
HID: winwing: constify read-only structs
These structs are never modified, so mark them as const. Signed-off-by: Thomas Weißschuh <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Benjamin Tissoires <[email protected]>
1 parent e6de161 commit c1f9eff

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/hid/hid-winwing.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct winwing_led_info {
2727
const char *led_name;
2828
};
2929

30-
static struct winwing_led_info led_info[3] = {
30+
static const struct winwing_led_info led_info[3] = {
3131
{ 0, 255, "backlight" },
3232
{ 1, 1, "a-a" },
3333
{ 2, 1, "a-g" },
@@ -94,7 +94,7 @@ static int winwing_init_led(struct hid_device *hdev,
9494
return -ENOMEM;
9595

9696
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];
9898

9999
led = &data->leds[i];
100100
led->hdev = hdev;
@@ -150,7 +150,7 @@ static int winwing_input_configured(struct hid_device *hdev,
150150
return ret;
151151
}
152152

153-
static __u8 original_rdesc_buttons[] = {
153+
static const __u8 original_rdesc_buttons[] = {
154154
0x05, 0x09, 0x19, 0x01, 0x29, 0x6F,
155155
0x15, 0x00, 0x25, 0x01, 0x35, 0x00,
156156
0x45, 0x01, 0x75, 0x01, 0x95, 0x6F,

0 commit comments

Comments
 (0)