summaryrefslogtreecommitdiff
path: root/sound/usb/midi.c
diff options
context:
space:
mode:
authorVincent Mailhol <mailhol.vincent@wanadoo.fr>2022-03-17 06:55:12 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-04-23 11:33:53 +0300
commit80b2b03bacfc071ceaac034fa81d535d27d57b31 (patch)
treef2ccba9cc833b6f8dad1f8123910b3aef46e5657 /sound/usb/midi.c
parentdcd2e49b550e928164ccefb5bdf90988ed4df00e (diff)
downloadlinux-80b2b03bacfc071ceaac034fa81d535d27d57b31.tar.xz
sound: usb: 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: Jaroslav Kysela <perex@perex.cz> CC: Takashi Iwai <tiwai@suse.com> CC: Clemens Ladisch <clemens@ladisch.de> Acked-by: Takashi Iwai <tiwai@suse.de> Signed-off-by: Vincent Mailhol <mailhol.vincent@wanadoo.fr> Link: https://lore.kernel.org/r/20220317035514.6378-8-mailhol.vincent@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/midi.c')
-rw-r--r--sound/usb/midi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sound/usb/midi.c b/sound/usb/midi.c
index 2c01649c70f6..fba498f9e7dc 100644
--- a/sound/usb/midi.c
+++ b/sound/usb/midi.c
@@ -1285,7 +1285,7 @@ static int snd_usbmidi_in_endpoint_create(struct snd_usb_midi *umidi,
pipe = usb_rcvintpipe(umidi->dev, ep_info->in_ep);
else
pipe = usb_rcvbulkpipe(umidi->dev, ep_info->in_ep);
- length = usb_maxpacket(umidi->dev, pipe, 0);
+ length = usb_maxpacket(umidi->dev, pipe);
for (i = 0; i < INPUT_URBS; ++i) {
buffer = usb_alloc_coherent(umidi->dev, length, GFP_KERNEL,
&ep->urbs[i]->transfer_dma);
@@ -1374,7 +1374,7 @@ static int snd_usbmidi_out_endpoint_create(struct snd_usb_midi *umidi,
pipe = usb_sndbulkpipe(umidi->dev, ep_info->out_ep);
switch (umidi->usb_id) {
default:
- ep->max_transfer = usb_maxpacket(umidi->dev, pipe, 1);
+ ep->max_transfer = usb_maxpacket(umidi->dev, pipe);
break;
/*
* Various chips declare a packet size larger than 4 bytes, but