ALSA: usb-audio: Rewrite registration quirk handling

A slight refactoring of the registration quirk code.  Now it uses the
table lookup for easy additions in future.  Also the return type was
changed to bool, and got a few more comments.

Link: https://lore.kernel.org/r/20200325103322.2508-2-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
This commit is contained in:
Takashi Iwai
2020-03-25 11:33:19 +01:00
parent c208a53350
commit d8695bc5b1
3 changed files with 32 additions and 13 deletions

View File

@@ -51,7 +51,6 @@ void snd_usb_audioformat_attributes_quirk(struct snd_usb_audio *chip,
struct audioformat *fp,
int stream);
int snd_usb_registration_quirk(struct snd_usb_audio *chip,
int iface);
bool snd_usb_registration_quirk(struct snd_usb_audio *chip, int iface);
#endif /* __USBAUDIO_QUIRKS_H */