summaryrefslogtreecommitdiff
path: root/sound/pci/hda/hda_beep.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/hda/hda_beep.c')
-rw-r--r--sound/pci/hda/hda_beep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c
index 53a2b89f8983..bf2f726e5901 100644
--- a/sound/pci/hda/hda_beep.c
+++ b/sound/pci/hda/hda_beep.c
@@ -25,6 +25,7 @@ static void generate_tone(struct hda_beep *beep, int tone)
{
struct hda_codec *codec = beep->codec;
+ snd_power_wait_and_ref(codec->card, true);
if (tone && !beep->playing) {
snd_hda_power_up(codec);
if (beep->power_hook)
@@ -39,6 +40,7 @@ static void generate_tone(struct hda_beep *beep, int tone)
beep->power_hook(beep, false);
snd_hda_power_down(codec);
}
+ snd_power_unref(codec->card);
}
static void snd_hda_generate_beep(struct work_struct *work)