Revert "ALSA: usb-audio: Yet more regression for for the delayed card registration"

This reverts commit 031d1480a0 which is
commit 971cb608d1c5d95533a43b549bb8ec9637f10043 upstream.

The commit it was attempting to fix was already reverted from the
Android kernel tree due to ABI issues, so this commit also needs to be
reverted in order to preserve the build.

Bug: 161946584
Fixes: 031d1480a0 ("ALSA: usb-audio: Yet more regression for for the delayed card registration")
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I7aa38fdc416e2bc8a2dc6d880a07ff11d67b1dd2
This commit is contained in:
Greg Kroah-Hartman
2022-12-20 13:08:28 +00:00
parent ac2a7a141f
commit 6fa2a43acd

View File

@@ -726,18 +726,6 @@ get_alias_quirk(struct usb_device *dev, unsigned int id)
return NULL;
}
/* register card if we reach to the last interface or to the specified
* one given via option
*/
static int try_to_register_card(struct snd_usb_audio *chip, int ifnum)
{
if (check_delayed_register_option(chip) == ifnum ||
chip->last_iface == ifnum ||
usb_interface_claimed(usb_ifnum_to_if(chip->dev, chip->last_iface)))
return snd_card_register(chip->card);
return 0;
}
/*
* probe the active usb device
*
@@ -906,11 +894,6 @@ static int usb_audio_probe(struct usb_interface *intf,
return 0;
__error:
/* in the case of error in secondary interface, still try to register */
if (chip)
try_to_register_card(chip, ifnum);
__error_no_register:
if (chip) {
/* chip->active is inside the chip->card object,
* decrement before memory is possibly returned.