Skip to content

Commit aeeba45

Browse files
ian-abbottJiri Kosina
authored andcommitted
HID: wiimote: make handlers[] const
The `handlers[]` array contents are never modified, so use the `const` qualifier. Signed-off-by: Ian Abbott <[email protected]> Reviewed-by: David Rheinsberg <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent fc3abb5 commit aeeba45

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/hid/hid-wiimote-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1586,7 +1586,7 @@ struct wiiproto_handler {
15861586
void (*func)(struct wiimote_data *wdata, const __u8 *payload);
15871587
};
15881588

1589-
static struct wiiproto_handler handlers[] = {
1589+
static const struct wiiproto_handler handlers[] = {
15901590
{ .id = WIIPROTO_REQ_STATUS, .size = 6, .func = handler_status },
15911591
{ .id = WIIPROTO_REQ_STATUS, .size = 2, .func = handler_status_K },
15921592
{ .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,
16181618
u8 *raw_data, int size)
16191619
{
16201620
struct wiimote_data *wdata = hid_get_drvdata(hdev);
1621-
struct wiiproto_handler *h;
1621+
const struct wiiproto_handler *h;
16221622
int i;
16231623
unsigned long flags;
16241624

0 commit comments

Comments
 (0)