From: Adrian Bunk Date: Fri, 29 Sep 2006 09:01:36 +0000 (-0700) Subject: [PATCH] build sound/sound_firmware.c only for OSS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9dd6ffc3d6b56417a2c4c917f51dab6470166e6;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git [PATCH] build sound/sound_firmware.c only for OSS 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. [alan@lxorguk.ukuu.org.uk: comment fix] Signed-off-by: Adrian Bunk Acked-by: Takashi Iwai Signed-off-by: Alan Cox Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/sound/Makefile b/sound/Makefile index 1f60797afa8a..5f6bef57e825 100644 --- a/sound/Makefile +++ b/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 --git a/sound/sound_core.c b/sound/sound_core.c index 62d4d0c81261..0b0a016ca6d6 100644 --- a/sound/sound_core.c +++ b/sound/sound_core.c @@ -551,10 +551,6 @@ int soundcore_open(struct inode *inode, struct file *file) 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 --git a/sound/sound_firmware.c b/sound/sound_firmware.c index 6ddadfac35ad..3a181d4c0dc6 100644 --- a/sound/sound_firmware.c +++ b/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) { @@ -59,8 +60,7 @@ static int do_mod_firmware_load(const char *fn, char **fp) * value zero on a failure. * * Caution: This API is not recommended. Firmware should be loaded via - * an ioctl call and a setup application. This function may disappear - * in future. + * request_firmware. */ int mod_firmware_load(const char *fn, char **fp) @@ -73,4 +73,6 @@ int mod_firmware_load(const char *fn, char **fp) set_fs(fs); return r; } +EXPORT_SYMBOL(mod_firmware_load); +MODULE_LICENSE("GPL");