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: Jie Yang <yang.jie@intel.com> Reviewed-by: Mark Brown <broonie@kernel.org> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Этот коммит содержится в:

коммит произвёл
Takashi Iwai

родитель
e0ecb05a96
Коммит
cd6a65036f
@@ -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
|
||||
|
@@ -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 */
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -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
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -1181,7 +1181,7 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
|
||||
}
|
||||
EXPORT_SYMBOL(snd_pcm_notify);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* Info interface
|
||||
*/
|
||||
@@ -1227,10 +1227,10 @@ static void snd_pcm_proc_done(void)
|
||||
snd_info_free_entry(snd_pcm_proc_entry);
|
||||
}
|
||||
|
||||
#else /* !CONFIG_PROC_FS */
|
||||
#else /* !CONFIG_SND_PROC_FS */
|
||||
#define snd_pcm_proc_init()
|
||||
#define snd_pcm_proc_done()
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
||||
|
||||
/*
|
||||
|
@@ -45,7 +45,7 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC);
|
||||
*/
|
||||
static int register_device(void);
|
||||
static void unregister_device(void);
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
static int register_proc(void);
|
||||
static void unregister_proc(void);
|
||||
#else
|
||||
@@ -261,7 +261,7 @@ unregister_device(void)
|
||||
* /proc interface
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
|
||||
static struct snd_info_entry *info_entry;
|
||||
|
||||
@@ -303,4 +303,4 @@ unregister_proc(void)
|
||||
snd_info_free_entry(info_entry);
|
||||
info_entry = NULL;
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -479,8 +479,7 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
|
||||
snd_seq_oss_timer_stop(dp->timer);
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* misc. functions for proc interface
|
||||
*/
|
||||
@@ -531,4 +530,4 @@ snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
|
||||
snd_seq_oss_readq_info_read(dp->readq, buf);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -665,7 +665,7 @@ snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* proc interface
|
||||
*/
|
||||
@@ -705,4 +705,4 @@ snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
|
||||
snd_use_lock_free(&mdev->use_lock);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -222,7 +222,7 @@ snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* proc interface
|
||||
*/
|
||||
@@ -233,4 +233,4 @@ snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf
|
||||
(waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
|
||||
q->qlen, q->input_time);
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -630,7 +630,7 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* proc interface
|
||||
*/
|
||||
@@ -658,4 +658,4 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
|
||||
snd_use_lock_free(&rec->use_lock);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -2447,7 +2447,7 @@ EXPORT_SYMBOL(snd_seq_kernel_client_write_poll);
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* /proc interface
|
||||
*/
|
||||
@@ -2549,7 +2549,7 @@ void snd_seq_info_clients_read(struct snd_info_entry *entry,
|
||||
snd_seq_client_unlock(client);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
|
||||
|
@@ -72,7 +72,7 @@ static struct bus_type snd_seq_bus_type = {
|
||||
/*
|
||||
* proc interface -- just for compatibility
|
||||
*/
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
static struct snd_info_entry *info_entry;
|
||||
|
||||
static int print_dev_info(struct device *dev, void *data)
|
||||
|
@@ -29,7 +29,7 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry, struct snd_info_buffe
|
||||
void snd_seq_info_queues_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer);
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
int snd_seq_info_init( void );
|
||||
int snd_seq_info_done( void );
|
||||
#else
|
||||
|
@@ -753,7 +753,7 @@ int snd_seq_control_queue(struct snd_seq_event *ev, int atomic, int hop)
|
||||
|
||||
/*----------------------------------------------------------------*/
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/* exported to seq_info.c */
|
||||
void snd_seq_info_queues_read(struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
@@ -787,5 +787,5 @@ void snd_seq_info_queues_read(struct snd_info_entry *entry,
|
||||
queuefree(q);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
||||
|
@@ -422,7 +422,7 @@ snd_seq_tick_time_t snd_seq_timer_get_cur_tick(struct snd_seq_timer *tmr)
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/* exported to seq_info.c */
|
||||
void snd_seq_info_timer_read(struct snd_info_entry *entry,
|
||||
struct snd_info_buffer *buffer)
|
||||
@@ -449,5 +449,5 @@ void snd_seq_info_timer_read(struct snd_info_entry *entry,
|
||||
queuefree(q);
|
||||
}
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
||||
|
@@ -330,7 +330,7 @@ int snd_unregister_device(struct device *dev)
|
||||
}
|
||||
EXPORT_SYMBOL(snd_unregister_device);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* INFO PART
|
||||
*/
|
||||
@@ -391,7 +391,7 @@ int __init snd_minor_info_init(void)
|
||||
entry->c.text.read = snd_minor_info_read;
|
||||
return snd_info_register(entry); /* freed in error path */
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
||||
/*
|
||||
* INIT PART
|
||||
|
@@ -207,7 +207,7 @@ EXPORT_SYMBOL(snd_unregister_oss_device);
|
||||
* INFO PART
|
||||
*/
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
static const char *snd_oss_device_type_name(int type)
|
||||
{
|
||||
switch (type) {
|
||||
@@ -259,4 +259,4 @@ int __init snd_minor_info_oss_init(void)
|
||||
entry->c.text.read = snd_minor_info_oss_read;
|
||||
return snd_info_register(entry); /* freed in error path */
|
||||
}
|
||||
#endif /* CONFIG_PROC_FS */
|
||||
#endif /* CONFIG_SND_PROC_FS */
|
||||
|
@@ -1034,7 +1034,7 @@ static int snd_timer_register_system(void)
|
||||
return snd_timer_global_register(timer);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#ifdef CONFIG_SND_PROC_FS
|
||||
/*
|
||||
* Info interface
|
||||
*/
|
||||
@@ -1104,7 +1104,7 @@ static void __exit snd_timer_proc_done(void)
|
||||
{
|
||||
snd_info_free_entry(snd_timer_proc_entry);
|
||||
}
|
||||
#else /* !CONFIG_PROC_FS */
|
||||
#else /* !CONFIG_SND_PROC_FS */
|
||||
#define snd_timer_proc_init()
|
||||
#define snd_timer_proc_done()
|
||||
#endif
|
||||
|
Ссылка в новой задаче
Block a user