From 8bfe17ad975ffbd0c7ce673993ed2242fbc4ad94 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Thu, 29 Jul 2021 09:43:59 +0200 Subject: ALSA: usb-audio: Move rate validation quirk into quirk_flags The rate validation at the device probe is applied only to the specific devices (currently only for MOTU devices), and this check can be moved to quirk_flags gracefully, too. Link: https://lore.kernel.org/r/20210729074404.19728-1-tiwai@suse.de Signed-off-by: Takashi Iwai --- sound/usb/format.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) (limited to 'sound/usb/format.c') diff --git a/sound/usb/format.c b/sound/usb/format.c index eb216fef4ba7..50efccbffb8a 100644 --- a/sound/usb/format.c +++ b/sound/usb/format.c @@ -472,12 +472,8 @@ static int validate_sample_rate_table_v2v3(struct snd_usb_audio *chip, * behavior afterwards by some unknown reason. Do this only for the * known devices. */ - switch (USB_ID_VENDOR(chip->usb_id)) { - case 0x07fd: /* MOTU */ - break; - default: + if (!(chip->quirk_flags & QUIRK_FLAG_VALIDATE_RATES)) return 0; /* don't perform the validation as default */ - } table = kcalloc(fp->nr_rates, sizeof(*table), GFP_KERNEL); if (!table) -- cgit v1.2.3