diff options
author | Daniel Mack <daniel@caiaq.de> | 2011-02-11 06:34:12 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2011-02-14 11:11:12 -0500 |
commit | 3347b26cab60e20534b9a46ceea70b9fb74297fb (patch) | |
tree | 6a7552d7a492ea9c9ce34ca6e20f82b6696b6aa8 /sound/usb/quirks.c | |
parent | 54a8c500d5b80c83e0f14cbcfcfd4a84abff8a80 (diff) |
ALSA: usb-audio: reconstruct some dispatcher functions to use switch-case
The number of cases has increased so use switch-case rather than
if-statements.
Signed-off-by: Daniel Mack <daniel@caiaq.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/quirks.c')
-rw-r--r-- | sound/usb/quirks.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/sound/usb/quirks.c b/sound/usb/quirks.c index e55bd1cac77d..ca860e611263 100644 --- a/sound/usb/quirks.c +++ b/sound/usb/quirks.c | |||
@@ -517,31 +517,32 @@ int snd_usb_apply_boot_quirk(struct usb_device *dev, | |||
517 | u32 id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), | 517 | u32 id = USB_ID(le16_to_cpu(dev->descriptor.idVendor), |
518 | le16_to_cpu(dev->descriptor.idProduct)); | 518 | le16_to_cpu(dev->descriptor.idProduct)); |
519 | 519 | ||
520 | /* SB Extigy needs special boot-up sequence */ | 520 | switch (id) { |
521 | /* if more models come, this will go to the quirk list. */ | 521 | case USB_ID(0x041e, 0x3000): |
522 | if (id == USB_ID(0x041e, 0x3000)) | 522 | /* SB Extigy needs special boot-up sequence */ |
523 | /* if more models come, this will go to the quirk list. */ | ||
523 | return snd_usb_extigy_boot_quirk(dev, intf); | 524 | return snd_usb_extigy_boot_quirk(dev, intf); |
524 | 525 | ||
525 | /* SB Audigy 2 NX needs its own boot-up magic, too */ | 526 | case USB_ID(0x041e, 0x3020): |
526 | if (id == USB_ID(0x041e, 0x3020)) | 527 | /* SB Audigy 2 NX needs its own boot-up magic, too */ |
527 | return snd_usb_audigy2nx_boot_quirk(dev); | 528 | return snd_usb_audigy2nx_boot_quirk(dev); |
528 | 529 | ||
529 | /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ | 530 | case USB_ID(0x10f5, 0x0200): |
530 | if (id == USB_ID(0x10f5, 0x0200)) | 531 | /* C-Media CM106 / Turtle Beach Audio Advantage Roadie */ |
531 | return snd_usb_cm106_boot_quirk(dev); | 532 | return snd_usb_cm106_boot_quirk(dev); |
532 | 533 | ||
533 | /* C-Media CM6206 / CM106-Like Sound Device */ | 534 | case USB_ID(0x0d8c, 0x0102): |
534 | if (id == USB_ID(0x0d8c, 0x0102)) | 535 | /* C-Media CM6206 / CM106-Like Sound Device */ |
535 | return snd_usb_cm6206_boot_quirk(dev); | 536 | return snd_usb_cm6206_boot_quirk(dev); |
536 | 537 | ||
537 | /* Access Music VirusTI Desktop */ | 538 | case USB_ID(0x133e, 0x0815): |
538 | if (id == USB_ID(0x133e, 0x0815)) | 539 | /* Access Music VirusTI Desktop */ |
539 | return snd_usb_accessmusic_boot_quirk(dev); | 540 | return snd_usb_accessmusic_boot_quirk(dev); |
540 | 541 | ||
541 | /* Native Instruments Devices */ | 542 | case USB_ID(0x17cc, 0x1010): /* Traktor Audio 6 */ |
542 | if (id == USB_ID(0x17cc, 0x1010) || /* Traktor Audio 6 */ | 543 | case USB_ID(0x17cc, 0x1020): /* Traktor Audio 10 */ |
543 | id == USB_ID(0x17cc, 0x1020)) /* Traktor Audio 10 */ | ||
544 | return snd_usb_nativeinstruments_boot_quirk(dev); | 544 | return snd_usb_nativeinstruments_boot_quirk(dev); |
545 | } | ||
545 | 546 | ||
546 | return 0; | 547 | return 0; |
547 | } | 548 | } |