]> git.baikalelectronics.ru Git - kernel.git/commit
ALSA: hda: Make device usage_count consistent across subsequent probing
authorCezary Rojewski <cezary.rojewski@intel.com>
Wed, 6 Jul 2022 12:02:24 +0000 (14:02 +0200)
committerTakashi Iwai <tiwai@suse.de>
Sat, 9 Jul 2022 16:37:25 +0000 (18:37 +0200)
commitb42213524835368299b7cfdc12f078ac26cd139e
treeae1e24b7fef5c26ebd89e7c694a1e1ecec19d39c
parent0aa9a3cbeae57e20c3ef4c4a84fb7c253befea21
ALSA: hda: Make device usage_count consistent across subsequent probing

AVS HDAudio bus driver does not tie with codec drivers tighly and
snd_hda_codec_device_new() can be called after codec's module reload. In
such case, rpm is forbidden and invoking pm_runtime_forbid()
unconditionally causes device's usage_count to become unbalanced. This
is later caught by WARN_ON() found in sound/soc/hda.c. Detect such
circumstance and bump the usage_count instead.

Signed-off-by: Cezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220706120230.427296-4-cezary.rojewski@intel.com
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_codec.c