From 46e5a786584e4d95fdb3a31f7c20206c7289641f Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Tue, 3 Jul 2012 17:36:35 +0200 Subject: [PATCH] --- yaml --- r: 316150 b: refs/heads/master c: 3fd877d32cac31292628fb8f443543fc1989b49b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/pci/hda/hda_beep.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/[refs] b/[refs] index e5aae882faea..f501beb0b57f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 257dfb410070b48e377c7894222b73ca41d662e0 +refs/heads/master: 3fd877d32cac31292628fb8f443543fc1989b49b diff --git a/trunk/sound/pci/hda/hda_beep.c b/trunk/sound/pci/hda/hda_beep.c index e6cf2a22c407..0bc2315b181d 100644 --- a/trunk/sound/pci/hda/hda_beep.c +++ b/trunk/sound/pci/hda/hda_beep.c @@ -165,12 +165,13 @@ static int snd_hda_do_attach(struct hda_beep *beep) int snd_hda_enable_beep_device(struct hda_codec *codec, int enable) { struct hda_beep *beep = codec->beep; - enable = !!enable; - if (beep == NULL) + if (!beep) return 0; + enable = !!enable; if (beep->enabled != enable) { beep->enabled = enable; if (!enable) { + cancel_work_sync(&beep->beep_work); /* turn off beep */ snd_hda_codec_write(beep->codec, beep->nid, 0, AC_VERB_SET_BEEP_CONTROL, 0);