Commit d6e68c57 authored by George Harker's avatar George Harker Committed by Takashi Iwai

ALSA: usb-audio: use usb headers rather than define structs locally

Use struct definitions from linux/usb/midi.h rather than locally
define the structs in sound/usb/midi.c.
Signed-off-by: default avatarGeorge Harker <george@george-graphics.co.uk>
Link: https://lore.kernel.org/r/20210226212457.24538-1-george@george-graphics.co.ukSigned-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent d9c05d22
...@@ -47,6 +47,7 @@ ...@@ -47,6 +47,7 @@
#include <linux/usb.h> #include <linux/usb.h>
#include <linux/wait.h> #include <linux/wait.h>
#include <linux/usb/audio.h> #include <linux/usb/audio.h>
#include <linux/usb/midi.h>
#include <linux/module.h> #include <linux/module.h>
#include <sound/core.h> #include <sound/core.h>
...@@ -77,23 +78,6 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>"); ...@@ -77,23 +78,6 @@ MODULE_AUTHOR("Clemens Ladisch <clemens@ladisch.de>");
MODULE_DESCRIPTION("USB Audio/MIDI helper module"); MODULE_DESCRIPTION("USB Audio/MIDI helper module");
MODULE_LICENSE("Dual BSD/GPL"); MODULE_LICENSE("Dual BSD/GPL");
struct usb_ms_header_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bDescriptorSubtype;
__u8 bcdMSC[2];
__le16 wTotalLength;
} __attribute__ ((packed));
struct usb_ms_endpoint_descriptor {
__u8 bLength;
__u8 bDescriptorType;
__u8 bDescriptorSubtype;
__u8 bNumEmbMIDIJack;
__u8 baAssocJackID[];
} __attribute__ ((packed));
struct snd_usb_midi_in_endpoint; struct snd_usb_midi_in_endpoint;
struct snd_usb_midi_out_endpoint; struct snd_usb_midi_out_endpoint;
struct snd_usb_midi_endpoint; struct snd_usb_midi_endpoint;
...@@ -1875,7 +1859,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi, ...@@ -1875,7 +1859,7 @@ static int snd_usbmidi_get_ms_info(struct snd_usb_midi *umidi,
ms_header->bDescriptorType == USB_DT_CS_INTERFACE && ms_header->bDescriptorType == USB_DT_CS_INTERFACE &&
ms_header->bDescriptorSubtype == UAC_HEADER) ms_header->bDescriptorSubtype == UAC_HEADER)
dev_dbg(&umidi->dev->dev, "MIDIStreaming version %02x.%02x\n", dev_dbg(&umidi->dev->dev, "MIDIStreaming version %02x.%02x\n",
ms_header->bcdMSC[1], ms_header->bcdMSC[0]); ((uint8_t *)&ms_header->bcdMSC)[1], ((uint8_t *)&ms_header->bcdMSC)[0]);
else else
dev_warn(&umidi->dev->dev, dev_warn(&umidi->dev->dev,
"MIDIStreaming interface descriptor not found\n"); "MIDIStreaming interface descriptor not found\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment