Skip to content

Commit 81b7ec4

Browse files
ArvindYadavCsJiri Kosina
authored andcommitted
HID: usbmouse: constify usb_device_id and fix space before '[' error
usb_device_id are not supposed to change at runtime. All functions working with usb_device_id provided by <linux/usb.h> work with const usb_device_id. So mark the non-const structs as const. Fix checkpatch.pl error: ERROR: space prohibited before open square bracket '['. Signed-off-by: Arvind Yadav <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent 46cb3cf commit 81b7ec4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/hid/usbhid/usbmouse.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ static void usb_mouse_disconnect(struct usb_interface *intf)
226226
}
227227
}
228228

229-
static struct usb_device_id usb_mouse_id_table [] = {
229+
static const struct usb_device_id usb_mouse_id_table[] = {
230230
{ USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT,
231231
USB_INTERFACE_PROTOCOL_MOUSE) },
232232
{ } /* Terminating entry */

0 commit comments

Comments
 (0)