Commit cd6a6503 authored by Jie Yang's avatar Jie Yang Committed by Takashi Iwai
Browse files

ALSA: replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS



We may disable proc fs only for sound part, to reduce ALSA
memory footprint. So add CONFIG_SND_PROC_FS and replace the
old CONFIG_PROC_FSs in alsa code.

With sound proc fs disabled, we can save about 9KB memory
size on X86_64 platform.

Signed-off-by: default avatarJie Yang <yang.jie@intel.com>
Reviewed-by: default avatarMark Brown <broonie@kernel.org>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent e0ecb05a
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -92,14 +92,14 @@ struct snd_info_entry {
	struct list_head list;
};

#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
int snd_info_minor_register(void);
#else
#define snd_info_minor_register()	0
#endif


#ifdef CONFIG_PROC_FS
#ifdef CONFIG_SND_PROC_FS

extern struct snd_info_entry *snd_seq_root;
#ifdef CONFIG_SND_OSSEMUL
@@ -197,7 +197,7 @@ static inline int snd_info_check_reserved_words(const char *str) { return 1; }
 * OSS info part
 */

#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)

#define SNDRV_OSS_INFO_DEV_AUDIO	0
#define SNDRV_OSS_INFO_DEV_SYNTH	1
@@ -210,6 +210,6 @@ static inline int snd_info_check_reserved_words(const char *str) { return 1; }
int snd_oss_info_register(int dev, int num, char *string);
#define snd_oss_info_unregister(dev, num) snd_oss_info_register(dev, num, NULL)

#endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */
#endif /* CONFIG_SND_OSSEMUL && CONFIG_SND_PROC_FS */

#endif /* __SOUND_INFO_H */
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@
#

snd-y     := sound.o init.o memory.o control.o misc.o device.o
ifneq ($(CONFIG_PROC_FS),)
ifneq ($(CONFIG_SND_PROC_FS),)
snd-y += info.o
snd-$(CONFIG_SND_OSSEMUL) += info_oss.o
endif
+3 −3
Original line number Diff line number Diff line
@@ -484,7 +484,7 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device)
	return 0;
}

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_SND_PROC_FS
/*
 *  Info interface
 */
@@ -521,10 +521,10 @@ static void __exit snd_hwdep_proc_done(void)
{
	snd_info_free_entry(snd_hwdep_proc_entry);
}
#else /* !CONFIG_PROC_FS */
#else /* !CONFIG_SND_PROC_FS */
#define snd_hwdep_proc_init()
#define snd_hwdep_proc_done()
#endif /* CONFIG_PROC_FS */
#endif /* CONFIG_SND_PROC_FS */


/*
+4 −4
Original line number Diff line number Diff line
@@ -100,7 +100,7 @@ int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
#endif

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_SND_PROC_FS
static void snd_card_id_read(struct snd_info_entry *entry,
			     struct snd_info_buffer *buffer)
{
@@ -122,7 +122,7 @@ static int init_info_for_card(struct snd_card *card)

	return snd_info_card_register(card);
}
#else /* !CONFIG_PROC_FS */
#else /* !CONFIG_SND_PROC_FS */
#define init_info_for_card(card)
#endif

@@ -776,7 +776,7 @@ int snd_card_register(struct snd_card *card)

EXPORT_SYMBOL(snd_card_register);

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_SND_PROC_FS
static void snd_card_info_read(struct snd_info_entry *entry,
			       struct snd_info_buffer *buffer)
{
@@ -861,7 +861,7 @@ int __init snd_card_info_init(void)

	return 0;
}
#endif /* CONFIG_PROC_FS */
#endif /* CONFIG_SND_PROC_FS */

/**
 *  snd_component_add - add a component string
+3 −3
Original line number Diff line number Diff line
@@ -1111,7 +1111,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mix
	return 0;
}

#ifdef CONFIG_PROC_FS
#ifdef CONFIG_SND_PROC_FS
/*
 */
#define MIXER_VOL(name) [SOUND_MIXER_##name] = #name
@@ -1255,10 +1255,10 @@ static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer)
	snd_info_free_entry(mixer->proc_entry);
	mixer->proc_entry = NULL;
}
#else /* !CONFIG_PROC_FS */
#else /* !CONFIG_SND_PROC_FS */
#define snd_mixer_oss_proc_init(mix)
#define snd_mixer_oss_proc_done(mix)
#endif /* CONFIG_PROC_FS */
#endif /* CONFIG_SND_PROC_FS */

static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
{
Loading