Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316149
b: refs/heads/master
c: 257dfb4
h: refs/heads/master
i:
  316147: 89d40ac
v: v3
  • Loading branch information
Takashi Iwai committed Jul 3, 2012
1 parent 6552fd6 commit 9e1fa0c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0401e8548eace5bdb8adfa3e82f56165982cb3ad
refs/heads/master: 257dfb410070b48e377c7894222b73ca41d662e0
14 changes: 6 additions & 8 deletions trunk/sound/pci/hda/hda_beep.c
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,7 @@ EXPORT_SYMBOL_HDA(snd_hda_enable_beep_device);
int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
{
struct hda_beep *beep;
int err;

if (!snd_hda_get_bool_hint(codec, "beep"))
return 0; /* disabled explicitly by hints */
Expand All @@ -201,19 +202,16 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)

beep->nid = nid;
beep->codec = codec;
beep->mode = codec->beep_mode;
codec->beep = beep;

INIT_WORK(&beep->beep_work, &snd_hda_generate_beep);
mutex_init(&beep->mutex);

if (beep->mode) {
int err = snd_hda_do_attach(beep);
if (err < 0) {
kfree(beep);
codec->beep = NULL;
return err;
}
err = snd_hda_do_attach(beep);
if (err < 0) {
kfree(beep);
codec->beep = NULL;
return err;
}

return 0;
Expand Down
1 change: 0 additions & 1 deletion trunk/sound/pci/hda/hda_beep.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
struct hda_beep {
struct input_dev *dev;
struct hda_codec *codec;
unsigned int mode;
char phys[32];
int tone;
hda_nid_t nid;
Expand Down

0 comments on commit 9e1fa0c

Please sign in to comment.