From 9bb1fe390de3e1def0dd162dbdaf62e0981105fa Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 16 Nov 2009 15:33:49 +0100 Subject: ALSA: hda - Fix beep_mode option value The beep_mode option value was wrongly defined: it must be 0 = off and 1 = on. Also, evaluate the beep_mode value at snd_hda_attach_beep_device() properly so that no device is created when beep_mode=0 is given. Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_beep.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sound/pci/hda/hda_beep.c') diff --git a/sound/pci/hda/hda_beep.c b/sound/pci/hda/hda_beep.c index 9e48798b415b..5fe34a8d8c81 100644 --- a/sound/pci/hda/hda_beep.c +++ b/sound/pci/hda/hda_beep.c @@ -215,7 +215,9 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid) struct hda_beep *beep; if (!snd_hda_get_bool_hint(codec, "beep")) - return 0; /* disabled explicitly */ + return 0; /* disabled explicitly by hints */ + if (codec->beep_mode == HDA_BEEP_MODE_OFF) + return 0; /* disabled by module option */ beep = kzalloc(sizeof(*beep), GFP_KERNEL); if (beep == NULL) -- cgit v1.2.3