ALSA: hda: beep - add missing cancel_delayed_work
authorJaroslav Kysela <perex@perex.cz>
Wed, 4 Nov 2009 11:46:49 +0000 (12:46 +0100)
committerTakashi Iwai <tiwai@suse.de>
Mon, 16 Nov 2009 10:35:05 +0000 (11:35 +0100)
The unregister work should be also canceled in snd_hda_detach_beep_device()
function.

Signed-off-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/pci/hda/hda_beep.c

index 74db40edb336e4163f4157d06c42e6e22fdee855..c819152de79b1a145e060ed92b99c6c58b8a4ef6 100644 (file)
@@ -239,6 +239,7 @@ void snd_hda_detach_beep_device(struct hda_codec *codec)
        struct hda_beep *beep = codec->beep;
        if (beep) {
                cancel_work_sync(&beep->register_work);
+               cancel_delayed_work(&beep->unregister_work);
                if (beep->enabled)
                        snd_hda_do_detach(beep);
                codec->beep = NULL;