diff options
author | Takashi Iwai <tiwai@suse.de> | 2013-01-07 12:42:48 +0100 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2013-01-12 08:43:56 +0100 |
commit | fce52a3bb15bf3db63cbde496f212edf5e6d366e (patch) | |
tree | 4d2a8da2c6500a2aff7af99fd938f4fb4b055949 /sound/pci/hda/hda_generic.c | |
parent | 76a19c69d9c971d652e263799536412ec7f8dcf3 (diff) | |
download | lwn-fce52a3bb15bf3db63cbde496f212edf5e6d366e.tar.gz lwn-fce52a3bb15bf3db63cbde496f212edf5e6d366e.zip |
ALSA: hda - Add snd_hda_gen_free() and snd_hda_gen_check_power_status()
Just to remove duplicated codes.
Also fixed EXPORT_SYMBOL() in hda_generic.c.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_generic.c')
-rw-r--r-- | sound/pci/hda/hda_generic.c | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/sound/pci/hda/hda_generic.c b/sound/pci/hda/hda_generic.c index 28ad5e98b341..1fb31975ee38 100644 --- a/sound/pci/hda/hda_generic.c +++ b/sound/pci/hda/hda_generic.c @@ -3939,36 +3939,39 @@ int snd_hda_gen_init(struct hda_codec *codec) hda_call_check_power_status(codec, 0x01); return 0; } -EXPORT_SYMBOL(snd_hda_gen_init); +EXPORT_SYMBOL_HDA(snd_hda_gen_init); -/* - * the generic codec support - */ +void snd_hda_gen_free(struct hda_codec *codec) +{ + snd_hda_gen_spec_free(codec->spec); + kfree(codec->spec); + codec->spec = NULL; +} +EXPORT_SYMBOL_HDA(snd_hda_gen_free); #ifdef CONFIG_PM -static int generic_check_power_status(struct hda_codec *codec, hda_nid_t nid) +int snd_hda_gen_check_power_status(struct hda_codec *codec, hda_nid_t nid) { struct hda_gen_spec *spec = codec->spec; return snd_hda_check_amp_list_power(codec, &spec->loopback, nid); } +EXPORT_SYMBOL_HDA(snd_hda_gen_check_power_status); #endif -static void generic_free(struct hda_codec *codec) -{ - snd_hda_gen_spec_free(codec->spec); - kfree(codec->spec); - codec->spec = NULL; -} + +/* + * the generic codec support + */ static const struct hda_codec_ops generic_patch_ops = { .build_controls = snd_hda_gen_build_controls, .build_pcms = snd_hda_gen_build_pcms, .init = snd_hda_gen_init, - .free = generic_free, + .free = snd_hda_gen_free, .unsol_event = snd_hda_jack_unsol_event, #ifdef CONFIG_PM - .check_power_status = generic_check_power_status, + .check_power_status = snd_hda_gen_check_power_status, #endif }; @@ -3995,7 +3998,7 @@ int snd_hda_parse_generic_codec(struct hda_codec *codec) return 0; error: - generic_free(codec); + snd_hda_gen_free(codec); return err; } -EXPORT_SYMBOL(snd_hda_parse_generic_codec); +EXPORT_SYMBOL_HDA(snd_hda_parse_generic_codec); |