Skip to content

Commit

Permalink
HID: usbmouse: constify usb_device_id and fix space before '[' error
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
ArvindYadavCs authored and Jiri Kosina committed Aug 10, 2017
1 parent 46cb3cf commit 81b7ec4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/hid/usbhid/usbmouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ static void usb_mouse_disconnect(struct usb_interface *intf)
}
}

static struct usb_device_id usb_mouse_id_table [] = {
static const struct usb_device_id usb_mouse_id_table[] = {
{ USB_INTERFACE_INFO(USB_INTERFACE_CLASS_HID, USB_INTERFACE_SUBCLASS_BOOT,
USB_INTERFACE_PROTOCOL_MOUSE) },
{ } /* Terminating entry */
Expand Down

0 comments on commit 81b7ec4

Please sign in to comment.