aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/hda/hda_eld.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2008-11-21 03:11:50 -0500
committerTakashi Iwai <tiwai@suse.de>2008-11-21 03:17:30 -0500
commitf208dba97f2f3ff2fbcbe771195061e2a0dac870 (patch)
tree0c9bf38427af8c3c44e6c8e47cbc0ecf7e11f009 /sound/pci/hda/hda_eld.c
parentb94d3539de59ec6481e38f83c455324fd3aeabc1 (diff)
ALSA: hda - Release ELD proc file
Release ELD proc file when reconfigured so that no leak occurs. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_eld.c')
-rw-r--r--sound/pci/hda/hda_eld.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sound/pci/hda/hda_eld.c b/sound/pci/hda/hda_eld.c
index d2b7ccca3bb3..8740e7be8b24 100644
--- a/sound/pci/hda/hda_eld.c
+++ b/sound/pci/hda/hda_eld.c
@@ -567,8 +567,17 @@ int snd_hda_eld_proc_new(struct hda_codec *codec, struct hdmi_eld *eld)
567 snd_info_set_text_ops(entry, eld, hdmi_print_eld_info); 567 snd_info_set_text_ops(entry, eld, hdmi_print_eld_info);
568 entry->c.text.write = hdmi_write_eld_item; 568 entry->c.text.write = hdmi_write_eld_item;
569 entry->mode |= S_IWUSR; 569 entry->mode |= S_IWUSR;
570 eld->proc_entry = entry;
570 571
571 return 0; 572 return 0;
572} 573}
573 574
574#endif 575void snd_hda_eld_proc_free(struct hda_codec *codec, struct hdmi_eld *eld)
576{
577 if (!codec->bus->shutdown && eld->proc_entry) {
578 snd_device_free(codec->bus->card, eld->proc_entry);
579 eld->proc_entry = NULL;
580 }
581}
582
583#endif /* CONFIG_PROC_FS */