diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-08-17 10:21:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2022-02-08 18:24:27 +0100 |
commit | f2c5fde84cee5ac0436e92c6f6c15dce0c7d0506 (patch) | |
tree | a549da5af22c687848a1446f7bf5f513a867b856 /sound/usb/quirks-table.h | |
parent | fd9a23319f16e7031f0d8c98eed6e093c2927229 (diff) |
ALSA: usb-audio: Simplify quirk entries with a macro
commit fa10635fca359f047df6a18b3befd2f1e7304e1a upstream.
Introduce a new macro USB_AUDIO_DEVICE() for the entries matching with
the pid/vid pair and the class/subclass, and remove the open-code.
Link: https://lore.kernel.org/r/20200817082140.20232-3-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
[ just add the macro for 5.4.y, no entry changes made - gregkh ]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'sound/usb/quirks-table.h')
-rw-r--r-- | sound/usb/quirks-table.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/sound/usb/quirks-table.h b/sound/usb/quirks-table.h index 01dee2074ab3..c29ccdf9e8bc 100644 --- a/sound/usb/quirks-table.h +++ b/sound/usb/quirks-table.h @@ -25,6 +25,16 @@ .idProduct = prod, \ .bInterfaceClass = USB_CLASS_VENDOR_SPEC +/* A standard entry matching with vid/pid and the audio class/subclass */ +#define USB_AUDIO_DEVICE(vend, prod) \ + .match_flags = USB_DEVICE_ID_MATCH_DEVICE | \ + USB_DEVICE_ID_MATCH_INT_CLASS | \ + USB_DEVICE_ID_MATCH_INT_SUBCLASS, \ + .idVendor = vend, \ + .idProduct = prod, \ + .bInterfaceClass = USB_CLASS_AUDIO, \ + .bInterfaceSubClass = USB_SUBCLASS_AUDIOCONTROL + /* HP Thunderbolt Dock Audio Headset */ { USB_DEVICE(0x03f0, 0x0269), |