Commit b9dd6ffc3d6b56417a2c4c917f51dab6470166e6

Authored by Adrian Bunk
Committed by Linus Torvalds
1 parent e5582ca21a

[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 <bunk@stusta.de>
Acked-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

Showing 3 changed files with 6 additions and 7 deletions Side-by-side Diff

... ... @@ -2,6 +2,7 @@
2 2 #
3 3  
4 4 obj-$(CONFIG_SOUND) += soundcore.o
  5 +obj-$(CONFIG_SOUND_PRIME) += sound_firmware.o
5 6 obj-$(CONFIG_SOUND_PRIME) += oss/
6 7 obj-$(CONFIG_DMASOUND) += oss/
7 8 obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/
... ... @@ -11,5 +12,5 @@
11 12 obj-y += last.o
12 13 endif
13 14  
14   -soundcore-objs := sound_core.o sound_firmware.o
  15 +soundcore-objs := sound_core.o
... ... @@ -551,10 +551,6 @@
551 551 return -ENODEV;
552 552 }
553 553  
554   -extern int mod_firmware_load(const char *, char **);
555   -EXPORT_SYMBOL(mod_firmware_load);
556   -
557   -
558 554 MODULE_DESCRIPTION("Core sound module");
559 555 MODULE_AUTHOR("Alan Cox");
560 556 MODULE_LICENSE("GPL");
sound/sound_firmware.c
... ... @@ -4,6 +4,7 @@
4 4 #include <linux/mm.h>
5 5 #include <linux/slab.h>
6 6 #include <asm/uaccess.h>
  7 +#include "oss/sound_firmware.h"
7 8  
8 9 static int do_mod_firmware_load(const char *fn, char **fp)
9 10 {
... ... @@ -59,8 +60,7 @@
59 60 * value zero on a failure.
60 61 *
61 62 * Caution: This API is not recommended. Firmware should be loaded via
62   - * an ioctl call and a setup application. This function may disappear
63   - * in future.
  63 + * request_firmware.
64 64 */
65 65  
66 66 int mod_firmware_load(const char *fn, char **fp)
... ... @@ -73,4 +73,7 @@
73 73 set_fs(fs);
74 74 return r;
75 75 }
  76 +EXPORT_SYMBOL(mod_firmware_load);
  77 +
  78 +MODULE_LICENSE("GPL");