]> Gentwo Git Trees - linux/.git/commit
usb: gadget: midi2: Fix interpretation of is_midi1 bits
authorTakashi Iwai <tiwai@suse.de>
Wed, 27 Nov 2024 07:02:11 +0000 (08:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 4 Dec 2024 15:26:34 +0000 (16:26 +0100)
commit82937056967da052cbc04b4435c13db84192dc52
tree2664991c72525336d6d6177b8efbff456e4b52fa
parenta4faee01179a4d9cbad9ba6be2da8637c68c1438
usb: gadget: midi2: Fix interpretation of is_midi1 bits

The UMP Function Block info m1.0 field (represented by is_midi1 sysfs
entry) is an enumeration from 0 to 2, while the midi2 gadget driver
incorrectly copies it to the corresponding snd_ump_block_info.flags
bits as-is.  This made the wrong bit flags set when m1.0 = 2.

This patch corrects the wrong interpretation of is_midi1 bits.

Fixes: 29ee7a4dddd5 ("usb: gadget: midi2: Add configfs support")
Cc: stable@vger.kernel.org
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20241127070213.8232-1-tiwai@suse.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/f_midi2.c