From c4c2533f802d6877803c4d778def43d8a122f27b Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Mar 2015 17:22:12 +0100 Subject: ALSA: hda - Fix possible runtime PM refcount unbalance When the driver is unloaded before the codec is bound, it still keeps the runtime PM refcount up, and results in the unbalance. This patch covers these cases by introducing a flag indicating the runtime PM initialization and handling the codec registration procedure more properly. It also fixes the missing input beep device as a gratis, too. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_bind.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sound/pci/hda/hda_bind.c') diff --git a/sound/pci/hda/hda_bind.c b/sound/pci/hda/hda_bind.c index 130f672e6f37..7b269c3237e3 100644 --- a/sound/pci/hda/hda_bind.c +++ b/sound/pci/hda/hda_bind.c @@ -95,6 +95,7 @@ static int hda_codec_driver_probe(struct device *dev) err = snd_card_register(codec->card); if (err < 0) goto error_module; + snd_hda_codec_register(codec); } return 0; -- cgit v1.2.3