summaryrefslogtreecommitdiff
path: root/drivers/hid
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-08-04 19:29:37 +0300
committerBenjamin Tissoires <bentiss@kernel.org>2024-08-27 19:25:53 +0300
commitc1f9eff7b270861005c7ec8146b6ad398c40940b (patch)
tree4f14a677342c4b29258390898ebb3e96afecfb45 /drivers/hid
parente6de161b5ab4315405f4001736c25a070def61c7 (diff)
downloadlinux-c1f9eff7b270861005c7ec8146b6ad398c40940b.tar.xz
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>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-winwing.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/hid/hid-winwing.c b/drivers/hid/hid-winwing.c
index 86b64c0ced12..831b760c66ea 100644
--- a/drivers/hid/hid-winwing.c
+++ b/drivers/hid/hid-winwing.c
@@ -27,7 +27,7 @@ struct winwing_led_info {
const char *led_name;
};
-static struct winwing_led_info led_info[3] = {
+static const struct winwing_led_info led_info[3] = {
{ 0, 255, "backlight" },
{ 1, 1, "a-a" },
{ 2, 1, "a-g" },
@@ -94,7 +94,7 @@ static int winwing_init_led(struct hid_device *hdev,
return -ENOMEM;
for (i = 0; i < 3; i += 1) {
- struct winwing_led_info *info = &led_info[i];
+ const struct winwing_led_info *info = &led_info[i];
led = &data->leds[i];
led->hdev = hdev;
@@ -150,7 +150,7 @@ static int winwing_input_configured(struct hid_device *hdev,
return ret;
}
-static __u8 original_rdesc_buttons[] = {
+static const __u8 original_rdesc_buttons[] = {
0x05, 0x09, 0x19, 0x01, 0x29, 0x6F,
0x15, 0x00, 0x25, 0x01, 0x35, 0x00,
0x45, 0x01, 0x75, 0x01, 0x95, 0x6F,