ALSA: usb-audio: scarlett2: Improve device info lookup
authorGeoffrey D. Bennett <g@b4.vu>
Mon, 21 Jun 2021 18:09:31 +0000 (03:39 +0930)
committerTakashi Iwai <tiwai@suse.de>
Tue, 22 Jun 2021 19:36:03 +0000 (21:36 +0200)
commitd92b91576e3787659917f32d514de8c4d75631b4
tree0355135711ab226d72bb0b458daf8031c8651ac6
parent76cb680603d5af2ccb40541b41d690113cf2df1f
ALSA: usb-audio: scarlett2: Improve device info lookup

Add the USB device ID to the scarlett2_device_info struct so that the
switch statement which finds the appropriate struct can be replaced
with a loop that looks through an array of pointers to those structs.

Suggested-by: Vladimir Sadovnikov <sadko4u@gmail.com>
Signed-off-by: Geoffrey D. Bennett <g@b4.vu>
Link: https://lore.kernel.org/r/474c408c29fb280a611e47e49e59ca2fb9810d27.1624294591.git.g@b4.vu
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer_scarlett_gen2.c