From: Ian Abbott Date: Fri, 4 Sep 2020 13:21:42 +0000 (+0100) Subject: HID: wiimote: make handlers[] const X-Git-Tag: v5.10-rc1~115^2~2^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aeeba45a9df34a00113f96f9f52c45e250ff7b7d;p=thirdparty%2Fkernel%2Flinux.git HID: wiimote: make handlers[] const The `handlers[]` array contents are never modified, so use the `const` qualifier. Signed-off-by: Ian Abbott Reviewed-by: David Rheinsberg Signed-off-by: Jiri Kosina --- diff --git a/drivers/hid/hid-wiimote-core.c b/drivers/hid/hid-wiimote-core.c index e484c3618deca..e03a0ba5611a6 100644 --- a/drivers/hid/hid-wiimote-core.c +++ b/drivers/hid/hid-wiimote-core.c @@ -1586,7 +1586,7 @@ struct wiiproto_handler { void (*func)(struct wiimote_data *wdata, const __u8 *payload); }; -static struct wiiproto_handler handlers[] = { +static const struct wiiproto_handler handlers[] = { { .id = WIIPROTO_REQ_STATUS, .size = 6, .func = handler_status }, { .id = WIIPROTO_REQ_STATUS, .size = 2, .func = handler_status_K }, { .id = WIIPROTO_REQ_DATA, .size = 21, .func = handler_data }, @@ -1618,7 +1618,7 @@ static int wiimote_hid_event(struct hid_device *hdev, struct hid_report *report, u8 *raw_data, int size) { struct wiimote_data *wdata = hid_get_drvdata(hdev); - struct wiiproto_handler *h; + const struct wiiproto_handler *h; int i; unsigned long flags;