From: Adrian Bunk All sound/sound_firmware.c contains is mod_firmware_load() that is a legacy API only used by some OSS drivers. This patch builds it into an own sound_firmware module that is only built depending on CONFIG_SOUND_PRIME making the kernel slightly smaller for ALSA users. Signed-off-by: Adrian Bunk Cc: Alan Cox Acked-by: Takashi Iwai Signed-off-by: Andrew Morton --- sound/Makefile | 3 ++- sound/sound_core.c | 4 ---- sound/sound_firmware.c | 3 +++ 3 files changed, 5 insertions(+), 5 deletions(-) diff -puN sound/Makefile~build-sound-sound_firmwarec-only-for-oss sound/Makefile --- a/sound/Makefile~build-sound-sound_firmwarec-only-for-oss +++ a/sound/Makefile @@ -2,6 +2,7 @@ # obj-$(CONFIG_SOUND) += soundcore.o +obj-$(CONFIG_SOUND_PRIME) += sound_firmware.o obj-$(CONFIG_SOUND_PRIME) += oss/ obj-$(CONFIG_DMASOUND) += oss/ obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/ @@ -11,4 +12,4 @@ ifeq ($(CONFIG_SND),y) obj-y += last.o endif -soundcore-objs := sound_core.o sound_firmware.o +soundcore-objs := sound_core.o diff -puN sound/sound_core.c~build-sound-sound_firmwarec-only-for-oss sound/sound_core.c --- a/sound/sound_core.c~build-sound-sound_firmwarec-only-for-oss +++ a/sound/sound_core.c @@ -551,10 +551,6 @@ int soundcore_open(struct inode *inode, return -ENODEV; } -extern int mod_firmware_load(const char *, char **); -EXPORT_SYMBOL(mod_firmware_load); - - MODULE_DESCRIPTION("Core sound module"); MODULE_AUTHOR("Alan Cox"); MODULE_LICENSE("GPL"); diff -puN sound/sound_firmware.c~build-sound-sound_firmwarec-only-for-oss sound/sound_firmware.c --- a/sound/sound_firmware.c~build-sound-sound_firmwarec-only-for-oss +++ a/sound/sound_firmware.c @@ -4,6 +4,7 @@ #include #include #include +#include "oss/sound_firmware.h" static int do_mod_firmware_load(const char *fn, char **fp) { @@ -73,4 +74,6 @@ int mod_firmware_load(const char *fn, ch set_fs(fs); return r; } +EXPORT_SYMBOL(mod_firmware_load); +MODULE_LICENSE("GPL"); _