Skip to content

Commit cd6a650

Browse files
keyonjietiwai
authored andcommitted
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>
1 parent e0ecb05 commit cd6a650

24 files changed

Lines changed: 52 additions & 52 deletions

‎include/sound/info.h‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -92,14 +92,14 @@ struct snd_info_entry {
9292
struct list_head list;
9393
};
9494

95-
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
95+
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
9696
int snd_info_minor_register(void);
9797
#else
9898
#define snd_info_minor_register() 0
9999
#endif
100100

101101

102-
#ifdef CONFIG_PROC_FS
102+
#ifdef CONFIG_SND_PROC_FS
103103

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

200-
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
200+
#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_SND_PROC_FS)
201201

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

213-
#endif /* CONFIG_SND_OSSEMUL && CONFIG_PROC_FS */
213+
#endif /* CONFIG_SND_OSSEMUL && CONFIG_SND_PROC_FS */
214214

215215
#endif /* __SOUND_INFO_H */

‎sound/core/Makefile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55

66
snd-y := sound.o init.o memory.o control.o misc.o device.o
7-
ifneq ($(CONFIG_PROC_FS),)
7+
ifneq ($(CONFIG_SND_PROC_FS),)
88
snd-y += info.o
99
snd-$(CONFIG_SND_OSSEMUL) += info_oss.o
1010
endif

‎sound/core/hwdep.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -484,7 +484,7 @@ static int snd_hwdep_dev_disconnect(struct snd_device *device)
484484
return 0;
485485
}
486486

487-
#ifdef CONFIG_PROC_FS
487+
#ifdef CONFIG_SND_PROC_FS
488488
/*
489489
* Info interface
490490
*/
@@ -521,10 +521,10 @@ static void __exit snd_hwdep_proc_done(void)
521521
{
522522
snd_info_free_entry(snd_hwdep_proc_entry);
523523
}
524-
#else /* !CONFIG_PROC_FS */
524+
#else /* !CONFIG_SND_PROC_FS */
525525
#define snd_hwdep_proc_init()
526526
#define snd_hwdep_proc_done()
527-
#endif /* CONFIG_PROC_FS */
527+
#endif /* CONFIG_SND_PROC_FS */
528528

529529

530530
/*

‎sound/core/init.c‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ int (*snd_mixer_oss_notify_callback)(struct snd_card *card, int free_flag);
100100
EXPORT_SYMBOL(snd_mixer_oss_notify_callback);
101101
#endif
102102

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

123123
return snd_info_card_register(card);
124124
}
125-
#else /* !CONFIG_PROC_FS */
125+
#else /* !CONFIG_SND_PROC_FS */
126126
#define init_info_for_card(card)
127127
#endif
128128

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

777777
EXPORT_SYMBOL(snd_card_register);
778778

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

862862
return 0;
863863
}
864-
#endif /* CONFIG_PROC_FS */
864+
#endif /* CONFIG_SND_PROC_FS */
865865

866866
/**
867867
* snd_component_add - add a component string

‎sound/core/oss/mixer_oss.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ static int snd_mixer_oss_build_input(struct snd_mixer_oss *mixer, struct snd_mix
11111111
return 0;
11121112
}
11131113

1114-
#ifdef CONFIG_PROC_FS
1114+
#ifdef CONFIG_SND_PROC_FS
11151115
/*
11161116
*/
11171117
#define MIXER_VOL(name) [SOUND_MIXER_##name] = #name
@@ -1255,10 +1255,10 @@ static void snd_mixer_oss_proc_done(struct snd_mixer_oss *mixer)
12551255
snd_info_free_entry(mixer->proc_entry);
12561256
mixer->proc_entry = NULL;
12571257
}
1258-
#else /* !CONFIG_PROC_FS */
1258+
#else /* !CONFIG_SND_PROC_FS */
12591259
#define snd_mixer_oss_proc_init(mix)
12601260
#define snd_mixer_oss_proc_done(mix)
1261-
#endif /* CONFIG_PROC_FS */
1261+
#endif /* CONFIG_SND_PROC_FS */
12621262

12631263
static void snd_mixer_oss_build(struct snd_mixer_oss *mixer)
12641264
{

‎sound/core/pcm.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1181,7 +1181,7 @@ int snd_pcm_notify(struct snd_pcm_notify *notify, int nfree)
11811181
}
11821182
EXPORT_SYMBOL(snd_pcm_notify);
11831183

1184-
#ifdef CONFIG_PROC_FS
1184+
#ifdef CONFIG_SND_PROC_FS
11851185
/*
11861186
* Info interface
11871187
*/
@@ -1227,10 +1227,10 @@ static void snd_pcm_proc_done(void)
12271227
snd_info_free_entry(snd_pcm_proc_entry);
12281228
}
12291229

1230-
#else /* !CONFIG_PROC_FS */
1230+
#else /* !CONFIG_SND_PROC_FS */
12311231
#define snd_pcm_proc_init()
12321232
#define snd_pcm_proc_done()
1233-
#endif /* CONFIG_PROC_FS */
1233+
#endif /* CONFIG_SND_PROC_FS */
12341234

12351235

12361236
/*

‎sound/core/seq/oss/seq_oss.c‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ MODULE_ALIAS_SNDRV_MINOR(SNDRV_MINOR_OSS_MUSIC);
4545
*/
4646
static int register_device(void);
4747
static void unregister_device(void);
48-
#ifdef CONFIG_PROC_FS
48+
#ifdef CONFIG_SND_PROC_FS
4949
static int register_proc(void);
5050
static void unregister_proc(void);
5151
#else
@@ -261,7 +261,7 @@ unregister_device(void)
261261
* /proc interface
262262
*/
263263

264-
#ifdef CONFIG_PROC_FS
264+
#ifdef CONFIG_SND_PROC_FS
265265

266266
static struct snd_info_entry *info_entry;
267267

@@ -303,4 +303,4 @@ unregister_proc(void)
303303
snd_info_free_entry(info_entry);
304304
info_entry = NULL;
305305
}
306-
#endif /* CONFIG_PROC_FS */
306+
#endif /* CONFIG_SND_PROC_FS */

‎sound/core/seq/oss/seq_oss_init.c‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -479,8 +479,7 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
479479
snd_seq_oss_timer_stop(dp->timer);
480480
}
481481

482-
483-
#ifdef CONFIG_PROC_FS
482+
#ifdef CONFIG_SND_PROC_FS
484483
/*
485484
* misc. functions for proc interface
486485
*/
@@ -531,4 +530,4 @@ snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
531530
snd_seq_oss_readq_info_read(dp->readq, buf);
532531
}
533532
}
534-
#endif /* CONFIG_PROC_FS */
533+
#endif /* CONFIG_SND_PROC_FS */

‎sound/core/seq/oss/seq_oss_midi.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -665,7 +665,7 @@ snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info
665665
}
666666

667667

668-
#ifdef CONFIG_PROC_FS
668+
#ifdef CONFIG_SND_PROC_FS
669669
/*
670670
* proc interface
671671
*/
@@ -705,4 +705,4 @@ snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
705705
snd_use_lock_free(&mdev->use_lock);
706706
}
707707
}
708-
#endif /* CONFIG_PROC_FS */
708+
#endif /* CONFIG_SND_PROC_FS */

‎sound/core/seq/oss/seq_oss_readq.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int
222222
}
223223

224224

225-
#ifdef CONFIG_PROC_FS
225+
#ifdef CONFIG_SND_PROC_FS
226226
/*
227227
* proc interface
228228
*/
@@ -233,4 +233,4 @@ snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf
233233
(waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
234234
q->qlen, q->input_time);
235235
}
236-
#endif /* CONFIG_PROC_FS */
236+
#endif /* CONFIG_SND_PROC_FS */

0 commit comments

Comments
 (0)