]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: usb-audio: Move snd_usb_autoresume() call out of setup_hw_info()
authorTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 08:53:15 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 23 Nov 2020 14:12:36 +0000 (15:12 +0100)
commitc2aa5c40bcfaa71e834a611011d311192cee8085
treeb4cf3ccca7e0b2fcd5969e1426a7746f82699f04
parentd663b6dd7ce5f134ed5e100900b5d1cc87be0597
ALSA: usb-audio: Move snd_usb_autoresume() call out of setup_hw_info()

This is a preliminary work for the upcoming hw-constraint change for
the implicit feedback mode.

Currently snd_usb_autoresume() is called at the end of
setup_hwinfo().  It's a bit confusing; because of this implicit
refcount usage, the caller side needs to call snd_usb_autosuspend()
later in the error path although it's not seen inside the function.
Instead, it's clearer to call both snd_usb_autoresume() and suspend()
in the very same function.

It's only refactoring and no functional changes.

Tested-by: Keith Milner <kamilner@superlative.org>
Tested-by: Dylan Robinson <dylan_robinson@motu.com>
Link: https://lore.kernel.org/r/20201123085347.19667-10-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/pcm.c