diff options
author | Takashi Iwai <tiwai@suse.de> | 2008-11-28 09:17:06 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2008-11-28 09:22:02 -0500 |
commit | ff7a3267368634e368ebaac68d5e3abf129edd1d (patch) | |
tree | 588571dbc3f6017c6fa26990f5349ca5f63c1f98 /sound/pci/hda/hda_codec.h | |
parent | 645f10c1ac7f733b224eaf97634edf9b20e2370e (diff) |
ALSA: hda - Don't export symbols when built-in kernel
The global functions in hda_codec.c and other core parts are only
for HD-audio codec and controller drivers. When the HD-audio driver
is built in kernel, all stuff have to be statically linked, thus
we don't need any exports.
This patch introduces a conditional macro to do export only
when needed.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/hda/hda_codec.h')
-rw-r--r-- | sound/pci/hda/hda_codec.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/sound/pci/hda/hda_codec.h b/sound/pci/hda/hda_codec.h index 586ea08b340b..6612d0f20bc6 100644 --- a/sound/pci/hda/hda_codec.h +++ b/sound/pci/hda/hda_codec.h | |||
@@ -905,4 +905,19 @@ static inline void snd_hda_power_down(struct hda_codec *codec) {} | |||
905 | #define snd_hda_codec_needs_resume(codec) 1 | 905 | #define snd_hda_codec_needs_resume(codec) 1 |
906 | #endif | 906 | #endif |
907 | 907 | ||
908 | /* | ||
909 | * Codec modularization | ||
910 | */ | ||
911 | |||
912 | /* Export symbols only for communication with codec drivers; | ||
913 | * When built in kernel, all HD-audio drivers are supposed to be statically | ||
914 | * linked to the kernel. Thus, the symbols don't have to (or shouldn't) be | ||
915 | * exported unless it's built as a module. | ||
916 | */ | ||
917 | #ifdef MODULE | ||
918 | #define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym) | ||
919 | #else | ||
920 | #define EXPORT_SYMBOL_HDA(sym) | ||
921 | #endif | ||
922 | |||
908 | #endif /* __SOUND_HDA_CODEC_H */ | 923 | #endif /* __SOUND_HDA_CODEC_H */ |