You've already forked linux-apfs
mirror of
https://github.com/linux-apfs/linux-apfs.git
synced 2026-05-01 15:00:59 -07:00
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>
This commit is contained in:
@@ -128,7 +128,7 @@ int snd_hda_attach_beep_device(struct hda_codec *codec, int nid)
|
||||
INIT_WORK(&beep->beep_work, &snd_hda_generate_beep);
|
||||
return 0;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hda_attach_beep_device);
|
||||
EXPORT_SYMBOL_HDA(snd_hda_attach_beep_device);
|
||||
|
||||
void snd_hda_detach_beep_device(struct hda_codec *codec)
|
||||
{
|
||||
@@ -141,4 +141,4 @@ void snd_hda_detach_beep_device(struct hda_codec *codec)
|
||||
kfree(beep);
|
||||
}
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(snd_hda_detach_beep_device);
|
||||
EXPORT_SYMBOL_HDA(snd_hda_detach_beep_device);
|
||||
|
||||
+74
-74
File diff suppressed because it is too large
Load Diff
@@ -905,4 +905,19 @@ static inline void snd_hda_power_down(struct hda_codec *codec) {}
|
||||
#define snd_hda_codec_needs_resume(codec) 1
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Codec modularization
|
||||
*/
|
||||
|
||||
/* Export symbols only for communication with codec drivers;
|
||||
* When built in kernel, all HD-audio drivers are supposed to be statically
|
||||
* linked to the kernel. Thus, the symbols don't have to (or shouldn't) be
|
||||
* exported unless it's built as a module.
|
||||
*/
|
||||
#ifdef MODULE
|
||||
#define EXPORT_SYMBOL_HDA(sym) EXPORT_SYMBOL_GPL(sym)
|
||||
#else
|
||||
#define EXPORT_SYMBOL_HDA(sym)
|
||||
#endif
|
||||
|
||||
#endif /* __SOUND_HDA_CODEC_H */
|
||||
|
||||
Reference in New Issue
Block a user