diff options
author | Takashi Iwai <tiwai@suse.de> | 2009-11-16 09:33:49 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2009-11-16 09:33:49 -0500 |
commit | 9bb1fe390de3e1def0dd162dbdaf62e0981105fa (patch) | |
tree | 6e0ae2081e0125030ead15c8d53b40dc14e93af9 /sound/pci/hda/hda_beep.c | |
parent | d5191e50b251594bdde10d4839a952ff1646ef62 (diff) |
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 <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_beep.c')
-rw-r--r-- | sound/pci/hda/hda_beep.c | 4 |
1 files changed, 3 insertions, 1 deletions
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) | |||
215 | struct hda_beep *beep; | 215 | struct hda_beep *beep; |
216 | 216 | ||
217 | if (!snd_hda_get_bool_hint(codec, "beep")) | 217 | if (!snd_hda_get_bool_hint(codec, "beep")) |
218 | return 0; /* disabled explicitly */ | 218 | return 0; /* disabled explicitly by hints */ |
219 | if (codec->beep_mode == HDA_BEEP_MODE_OFF) | ||
220 | return 0; /* disabled by module option */ | ||
219 | 221 | ||
220 | beep = kzalloc(sizeof(*beep), GFP_KERNEL); | 222 | beep = kzalloc(sizeof(*beep), GFP_KERNEL); |
221 | if (beep == NULL) | 223 | if (beep == NULL) |