From 8a02c0cc4a5915e01bf19ef030166567713d0eb7 Mon Sep 17 00:00:00 2001 From: Takashi Iwai Date: Mon, 10 Feb 2014 18:09:45 +0100 Subject: [PATCH] ALSA: hda - Move HDA_FIXUP_ACT_FREE call in snd_hda_gen_free() Now Realtek and Conexant codec parsers just call snd_hda_gen_free(). Signed-off-by: Takashi Iwai --- sound/pci/hda/hda_generic.c | 1 + sound/pci/hda/patch_conexant.c | 6 +----- sound/pci/hda/patch_realtek.c | 6 +----- 3 files changed, 3 insertions(+), 10 deletions(-) diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 437ef13c5a90..0c90eba6ba3d 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -5350,6 +5350,7 @@ EXPORT_SYMBOL_GPL(snd_hda_gen_init); */ void snd_hda_gen_free(struct hda_codec *codec) { + snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_FREE); snd_hda_detach_beep_device(codec); snd_hda_gen_spec_free(codec->spec); kfree(codec->spec); diff --git a/sound/pci/hda/patch_conexant.c b/sound/pci/hda/patch_conexant.c index 6cc646531ce8..47861474fd87 100644 --- a/sound/pci/hda/patch_conexant.c +++ b/sound/pci/hda/patch_conexant.c @@ -2798,11 +2798,7 @@ static int cx_auto_init(struct hda_codec *codec) return 0; } -static void cx_auto_free(struct hda_codec *codec) -{ - snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_FREE); - snd_hda_gen_free(codec); -} +#define cx_auto_free snd_hda_gen_free static const struct hda_codec_ops cx_auto_patch_ops = { .build_controls = cx_auto_build_controls, diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c index dbe2b184cdeb..4a1016c9500f 100644 --- a/sound/pci/hda/patch_realtek.c +++ b/sound/pci/hda/patch_realtek.c @@ -844,11 +844,7 @@ static inline void alc_shutup(struct hda_codec *codec) snd_hda_shutup_pins(codec); } -static void alc_free(struct hda_codec *codec) -{ - snd_hda_apply_fixup(codec, HDA_FIXUP_ACT_FREE); - snd_hda_gen_free(codec); -} +#define alc_free snd_hda_gen_free #ifdef CONFIG_PM static void alc_power_eapd(struct hda_codec *codec) -- 2.20.1