Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

HID: usbhid: remove third argument of usb_maxpacket()

The third argument of usb_maxpacket(): in_out has been deprecated
because it could be derived from the second argument (e.g. using
usb_pipeout(pipe)).

N.B. function usb_maxpacket() was made variadic to accommodate the
transition from the old prototype with three arguments to the new one
with only two arguments (so that no renaming is needed). The variadic
argument is to be removed once all users of usb_maxpacket() get
migrated.

CC: Jiri Kosina <jikos@kernel.org>
CC: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr>
Link: https://lore.kernel.org/r/20220317035514.6378-3-mailhol.vincent@wanadoo.fr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Vincent Mailhol and committed by
Greg Kroah-Hartman
b45cde33 0f08c2e7

+3 -3
+1 -1
drivers/hid/usbhid/hid-core.c
··· 387 387 388 388 usbhid->urbctrl->pipe = usb_rcvctrlpipe(hid_to_usb_dev(hid), 0); 389 389 maxpacket = usb_maxpacket(hid_to_usb_dev(hid), 390 - usbhid->urbctrl->pipe, 0); 390 + usbhid->urbctrl->pipe); 391 391 len += (len == 0); /* Don't allow 0-length reports */ 392 392 len = round_up(len, maxpacket); 393 393 if (len > usbhid->bufsize)
+1 -1
drivers/hid/usbhid/usbkbd.c
··· 279 279 return -ENODEV; 280 280 281 281 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); 282 - maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); 282 + maxp = usb_maxpacket(dev, pipe); 283 283 284 284 kbd = kzalloc(sizeof(struct usb_kbd), GFP_KERNEL); 285 285 input_dev = input_allocate_device();
+1 -1
drivers/hid/usbhid/usbmouse.c
··· 123 123 return -ENODEV; 124 124 125 125 pipe = usb_rcvintpipe(dev, endpoint->bEndpointAddress); 126 - maxp = usb_maxpacket(dev, pipe, usb_pipeout(pipe)); 126 + maxp = usb_maxpacket(dev, pipe); 127 127 128 128 mouse = kzalloc(sizeof(struct usb_mouse), GFP_KERNEL); 129 129 input_dev = input_allocate_device();