Skip to content

Commit

Permalink
[PATCH] build sound/sound_firmware.c only for OSS
Browse files Browse the repository at this point in the history
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.

[[email protected]: comment fix]
Signed-off-by: Adrian Bunk <[email protected]>
Acked-by: Takashi Iwai <[email protected]>
Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Sep 29, 2006
1 parent e5582ca commit b9dd6ff
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
3 changes: 2 additions & 1 deletion sound/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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/
Expand All @@ -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
4 changes: 0 additions & 4 deletions sound/sound_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
6 changes: 4 additions & 2 deletions sound/sound_firmware.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include <linux/mm.h>
#include <linux/slab.h>
#include <asm/uaccess.h>
#include "oss/sound_firmware.h"

static int do_mod_firmware_load(const char *fn, char **fp)
{
Expand Down Expand Up @@ -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)
Expand All @@ -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");

0 comments on commit b9dd6ff

Please sign in to comment.