diff options
author | Takashi Iwai <tiwai@suse.de> | 2020-03-25 11:33:19 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-03-26 10:47:00 +0100 |
commit | d8695bc5b1fe88305396b1f788d3b5f218e28a30 (patch) | |
tree | 0f756e8450b6d5c147a59d924585cb1fd95d2ec5 /sound/usb/card.c | |
parent | ALSA: core: Add snd_device_get_state() helper (diff) | |
download | linux-d8695bc5b1fe88305396b1f788d3b5f218e28a30.tar.xz linux-d8695bc5b1fe88305396b1f788d3b5f218e28a30.zip |
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>
Diffstat (limited to 'sound/usb/card.c')
-rw-r--r-- | sound/usb/card.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/usb/card.c b/sound/usb/card.c index 16bbe2a50fb7..55d563a8154d 100644 --- a/sound/usb/card.c +++ b/sound/usb/card.c @@ -665,7 +665,7 @@ static int usb_audio_probe(struct usb_interface *intf, /* we are allowed to call snd_card_register() many times, but first * check to see if a device needs to skip it or do anything special */ - if (snd_usb_registration_quirk(chip, ifnum) == 0) { + if (!snd_usb_registration_quirk(chip, ifnum)) { err = snd_card_register(chip->card); if (err < 0) goto __error; |