Skip to content

Commit b9dd6ff

Browse files
AdrianBunkLinus Torvalds
authored and
Linus Torvalds
committed
[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>
1 parent e5582ca commit b9dd6ff

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

sound/Makefile

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#
33

44
obj-$(CONFIG_SOUND) += soundcore.o
5+
obj-$(CONFIG_SOUND_PRIME) += sound_firmware.o
56
obj-$(CONFIG_SOUND_PRIME) += oss/
67
obj-$(CONFIG_DMASOUND) += oss/
78
obj-$(CONFIG_SND) += core/ i2c/ drivers/ isa/ pci/ ppc/ arm/ synth/ usb/ sparc/ parisc/ pcmcia/ mips/
@@ -11,4 +12,4 @@ ifeq ($(CONFIG_SND),y)
1112
obj-y += last.o
1213
endif
1314

14-
soundcore-objs := sound_core.o sound_firmware.o
15+
soundcore-objs := sound_core.o

sound/sound_core.c

-4
Original file line numberDiff line numberDiff line change
@@ -551,10 +551,6 @@ int soundcore_open(struct inode *inode, struct file *file)
551551
return -ENODEV;
552552
}
553553

554-
extern int mod_firmware_load(const char *, char **);
555-
EXPORT_SYMBOL(mod_firmware_load);
556-
557-
558554
MODULE_DESCRIPTION("Core sound module");
559555
MODULE_AUTHOR("Alan Cox");
560556
MODULE_LICENSE("GPL");

sound/sound_firmware.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <linux/mm.h>
55
#include <linux/slab.h>
66
#include <asm/uaccess.h>
7+
#include "oss/sound_firmware.h"
78

89
static int do_mod_firmware_load(const char *fn, char **fp)
910
{
@@ -59,8 +60,7 @@ static int do_mod_firmware_load(const char *fn, char **fp)
5960
* value zero on a failure.
6061
*
6162
* 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.
6464
*/
6565

6666
int mod_firmware_load(const char *fn, char **fp)
@@ -73,4 +73,6 @@ int mod_firmware_load(const char *fn, char **fp)
7373
set_fs(fs);
7474
return r;
7575
}
76+
EXPORT_SYMBOL(mod_firmware_load);
7677

78+
MODULE_LICENSE("GPL");

0 commit comments

Comments
 (0)