diff options
author | Ingo Molnar <mingo@kernel.org> | 2023-01-31 15:01:20 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2023-01-31 15:01:20 +0100 |
commit | 57a30218fa25c469ed507964bbf028b7a064309a (patch) | |
tree | 231c7ab6b08f567077b96ed760aaf4c685c899f3 /sound/usb/line6/midi.c | |
parent | KVM: selftests: Fix build of rseq test (diff) | |
parent | Linux 6.2-rc6 (diff) | |
download | linux-57a30218fa25c469ed507964bbf028b7a064309a.tar.xz linux-57a30218fa25c469ed507964bbf028b7a064309a.zip |
Merge tag 'v6.2-rc6' into sched/core, to pick up fixes
Pick up fixes before merging another batch of cpuidle updates.
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'sound/usb/line6/midi.c')
-rw-r--r-- | sound/usb/line6/midi.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/usb/line6/midi.c b/sound/usb/line6/midi.c index ba0e2b7e8fe1..0838632c788e 100644 --- a/sound/usb/line6/midi.c +++ b/sound/usb/line6/midi.c @@ -44,7 +44,8 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) int req, done; for (;;) { - req = min(line6_midibuf_bytes_free(mb), line6->max_packet_size); + req = min3(line6_midibuf_bytes_free(mb), line6->max_packet_size, + LINE6_FALLBACK_MAXPACKETSIZE); done = snd_rawmidi_transmit_peek(substream, chunk, req); if (done == 0) @@ -56,7 +57,8 @@ static void line6_midi_transmit(struct snd_rawmidi_substream *substream) for (;;) { done = line6_midibuf_read(mb, chunk, - LINE6_FALLBACK_MAXPACKETSIZE); + LINE6_FALLBACK_MAXPACKETSIZE, + LINE6_MIDIBUF_READ_TX); if (done == 0) break; |