[alsa-devel] [PATCH 00/10] Leftover CONFIG_PROC_FS fixes & cleanups
Hi,
here is a patch series to fix / clean up the leftover CONFIG_PROC_FS after Keyon's patch to introduce CONFIG_SND_PROC_FS.
Takashi
===
Takashi Iwai (10): ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS ALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS ALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FS ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS ALSA: ac97: Fix ifdef CONFIG_PROC_FS ALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FS ALSA: cs46xx: Fix old ifdef CONFIG_PROC_FS ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS ALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FS ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS
include/sound/emux_synth.h | 2 +- sound/drivers/aloop.c | 8 -------- sound/drivers/dummy.c | 4 ++-- sound/drivers/opl4/Makefile | 3 ++- sound/drivers/opl4/opl4_lib.c | 4 ---- sound/drivers/opl4/opl4_local.h | 7 +++++-- sound/drivers/opl4/opl4_proc.c | 4 ---- sound/i2c/other/ak4xxx-adda.c | 4 ---- sound/pci/ac97/Makefile | 2 +- sound/pci/ac97/ac97_local.h | 2 +- sound/pci/ak4531_codec.c | 6 ------ sound/pci/atiixp.c | 4 ---- sound/pci/atiixp_modem.c | 4 ---- sound/pci/ca0106/Makefile | 3 ++- sound/pci/ca0106/ca0106_main.c | 2 +- sound/pci/ca0106/ca0106_proc.c | 4 ---- sound/pci/cmipci.c | 5 ----- sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- sound/pci/cs46xx/cs46xx_lib.h | 4 ++-- sound/pci/cs46xx/dsp_spos.c | 4 ++-- sound/pci/cs46xx/dsp_spos_scb_lib.c | 6 +++--- sound/pci/emu10k1/Makefile | 3 ++- sound/pci/emu10k1/emu10k1_main.c | 2 +- sound/pci/emu10k1/emuproc.c | 2 -- sound/pci/ice1712/quartet.c | 7 +------ sound/pci/intel8x0.c | 4 ---- sound/pci/intel8x0m.c | 5 ----- sound/pci/oxygen/oxygen_lib.c | 4 ---- sound/synth/emux/Makefile | 5 +++-- sound/synth/emux/emux.c | 4 ---- sound/synth/emux/emux_proc.c | 4 ---- sound/synth/emux/emux_voice.h | 6 +++++- 32 files changed, 36 insertions(+), 96 deletions(-)
Since the compiler can optimize away the unused code, we can reduce the messy ifdef.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/drivers/aloop.c | 8 -------- 1 file changed, 8 deletions(-)
diff --git a/sound/drivers/aloop.c b/sound/drivers/aloop.c index 7f9126efc1e5..54f348a4fb78 100644 --- a/sound/drivers/aloop.c +++ b/sound/drivers/aloop.c @@ -1053,8 +1053,6 @@ static int loopback_mixer_new(struct loopback *loopback, int notify) return 0; }
-#ifdef CONFIG_PROC_FS - static void print_dpcm_info(struct snd_info_buffer *buffer, struct loopback_pcm *dpcm, const char *id) @@ -1128,12 +1126,6 @@ static int loopback_proc_new(struct loopback *loopback, int cidx) return 0; }
-#else /* !CONFIG_PROC_FS */ - -#define loopback_proc_new(loopback, cidx) do { } while (0) - -#endif - static int loopback_probe(struct platform_device *devptr) { struct snd_card *card;
Although there shouldn't be a problem in practice (the compiler should handle well), it's better to follow to the new Kconfig.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/drivers/dummy.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/drivers/dummy.c b/sound/drivers/dummy.c index 5912f440d30f..016e451ed506 100644 --- a/sound/drivers/dummy.c +++ b/sound/drivers/dummy.c @@ -914,7 +914,7 @@ static int snd_card_dummy_new_mixer(struct snd_dummy *dummy) return 0; }
-#if defined(CONFIG_SND_DEBUG) && defined(CONFIG_PROC_FS) +#if defined(CONFIG_SND_DEBUG) && defined(CONFIG_SND_PROC_FS) /* * proc interface */ @@ -1042,7 +1042,7 @@ static void dummy_proc_init(struct snd_dummy *chip) } #else #define dummy_proc_init(x) -#endif /* CONFIG_SND_DEBUG && CONFIG_PROC_FS */ +#endif /* CONFIG_SND_DEBUG && CONFIG_SND_PROC_FS */
static int snd_dummy_probe(struct platform_device *devptr) {
Some are replaced with the new ifdef CONFIG_SND_PROC_FS. Some are removed by building opl4_proc.o conditionally.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/drivers/opl4/Makefile | 3 ++- sound/drivers/opl4/opl4_lib.c | 4 ---- sound/drivers/opl4/opl4_local.h | 7 +++++-- sound/drivers/opl4/opl4_proc.c | 4 ---- 4 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/sound/drivers/opl4/Makefile b/sound/drivers/opl4/Makefile index b94009b0b19f..c8eaa433d71a 100644 --- a/sound/drivers/opl4/Makefile +++ b/sound/drivers/opl4/Makefile @@ -3,7 +3,8 @@ # Copyright (c) 2001 by Jaroslav Kysela perex@perex.cz #
-snd-opl4-lib-objs := opl4_lib.o opl4_mixer.o opl4_proc.o +snd-opl4-lib-objs := opl4_lib.o opl4_mixer.o +snd-opl4-lib-$(CONFIG_SND_PROC_FS) += opl4_proc.o snd-opl4-synth-objs := opl4_seq.o opl4_synth.o yrw801.o
obj-$(CONFIG_SND_OPL4_LIB) += snd-opl4-lib.o diff --git a/sound/drivers/opl4/opl4_lib.c b/sound/drivers/opl4/opl4_lib.c index 3b0ee42a5343..89c7aa04b3bc 100644 --- a/sound/drivers/opl4/opl4_lib.c +++ b/sound/drivers/opl4/opl4_lib.c @@ -176,9 +176,7 @@ static int snd_opl4_create_seq_dev(struct snd_opl4 *opl4, int seq_device)
static void snd_opl4_free(struct snd_opl4 *opl4) { -#ifdef CONFIG_PROC_FS snd_opl4_free_proc(opl4); -#endif release_and_free_resource(opl4->res_fm_port); release_and_free_resource(opl4->res_pcm_port); kfree(opl4); @@ -249,9 +247,7 @@ int snd_opl4_create(struct snd_card *card, snd_opl4_enable_opl4(opl4);
snd_opl4_create_mixer(opl4); -#ifdef CONFIG_PROC_FS snd_opl4_create_proc(opl4); -#endif
#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) opl4->seq_client = -1; diff --git a/sound/drivers/opl4/opl4_local.h b/sound/drivers/opl4/opl4_local.h index 470e5a758a02..9a41bdebce6b 100644 --- a/sound/drivers/opl4/opl4_local.h +++ b/sound/drivers/opl4/opl4_local.h @@ -178,7 +178,7 @@ struct snd_opl4 { spinlock_t reg_lock; struct snd_card *card;
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS struct snd_info_entry *proc_entry; int memory_access; #endif @@ -207,10 +207,13 @@ void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, i /* opl4_mixer.c */ int snd_opl4_create_mixer(struct snd_opl4 *opl4);
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS /* opl4_proc.c */ int snd_opl4_create_proc(struct snd_opl4 *opl4); void snd_opl4_free_proc(struct snd_opl4 *opl4); +#else +static inline int snd_opl4_create_proc(struct snd_opl4 *opl4) { return 0; } +static inline void snd_opl4_free_proc(struct snd_opl4 *opl4) {} #endif
/* opl4_seq.c */ diff --git a/sound/drivers/opl4/opl4_proc.c b/sound/drivers/opl4/opl4_proc.c index 9b824bfc919d..cd2c07fa2ef4 100644 --- a/sound/drivers/opl4/opl4_proc.c +++ b/sound/drivers/opl4/opl4_proc.c @@ -22,8 +22,6 @@ #include <linux/export.h> #include <sound/info.h>
-#ifdef CONFIG_PROC_FS - static int snd_opl4_mem_proc_open(struct snd_info_entry *entry, unsigned short mode, void **file_private_data) { @@ -129,5 +127,3 @@ void snd_opl4_free_proc(struct snd_opl4 *opl4) { snd_info_free_entry(opl4->proc_entry); } - -#endif /* CONFIG_PROC_FS */
The compiler can optimize it away if not needed.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/i2c/other/ak4xxx-adda.c | 4 ---- 1 file changed, 4 deletions(-)
diff --git a/sound/i2c/other/ak4xxx-adda.c b/sound/i2c/other/ak4xxx-adda.c index c65731088aa2..bf377dc192aa 100644 --- a/sound/i2c/other/ak4xxx-adda.c +++ b/sound/i2c/other/ak4xxx-adda.c @@ -859,7 +859,6 @@ static int build_deemphasis(struct snd_akm4xxx *ak, int num_emphs) return 0; }
-#ifdef CONFIG_PROC_FS static void proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -884,9 +883,6 @@ static int proc_init(struct snd_akm4xxx *ak) snd_info_set_text_ops(entry, ak, proc_regs_read); return 0; } -#else /* !CONFIG_PROC_FS */ -static int proc_init(struct snd_akm4xxx *ak) { return 0; } -#endif
int snd_akm4xxx_build_controls(struct snd_akm4xxx *ak) {
Replaced with the new CONFIG_SND_PROC_FS.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ac97/Makefile | 2 +- sound/pci/ac97/ac97_local.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/pci/ac97/Makefile b/sound/pci/ac97/Makefile index 41fa322f0971..526175333710 100644 --- a/sound/pci/ac97/Makefile +++ b/sound/pci/ac97/Makefile @@ -4,7 +4,7 @@ #
snd-ac97-codec-y := ac97_codec.o ac97_pcm.o -snd-ac97-codec-$(CONFIG_PROC_FS) += ac97_proc.o +snd-ac97-codec-$(CONFIG_SND_PROC_FS) += ac97_proc.o
# Toplevel Module Dependency obj-$(CONFIG_SND_AC97_CODEC) += snd-ac97-codec.o diff --git a/sound/pci/ac97/ac97_local.h b/sound/pci/ac97/ac97_local.h index c276a5e3f7ac..941a5062cc20 100644 --- a/sound/pci/ac97/ac97_local.h +++ b/sound/pci/ac97/ac97_local.h @@ -28,7 +28,7 @@ int snd_ac97_update_bits_nolock(struct snd_ac97 *ac97, unsigned short reg, unsigned short mask, unsigned short value);
/* ac97_proc.c */ -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS void snd_ac97_bus_proc_init(struct snd_ac97_bus * ac97); void snd_ac97_bus_proc_done(struct snd_ac97_bus * ac97); void snd_ac97_proc_init(struct snd_ac97 * ac97);
Build ca0106_proc.o conditionally to drop unneeded ifdef. Some are replaced with the new CONFIG_SND_PROC_FS.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ca0106/Makefile | 3 ++- sound/pci/ca0106/ca0106_main.c | 2 +- sound/pci/ca0106/ca0106_proc.c | 4 ---- 3 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/sound/pci/ca0106/Makefile b/sound/pci/ca0106/Makefile index dcbae7b31546..c1455fc5588c 100644 --- a/sound/pci/ca0106/Makefile +++ b/sound/pci/ca0106/Makefile @@ -1,3 +1,4 @@ -snd-ca0106-objs := ca0106_main.o ca0106_proc.o ca0106_mixer.o ca_midi.o +snd-ca0106-objs := ca0106_main.o ca0106_mixer.o ca_midi.o +snd-ca0106-$(CONFIG_SND_PROC_FS) += ca0106_proc.o
obj-$(CONFIG_SND_CA0106) += snd-ca0106.o diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c index 0b31732eb4dc..d3cd95633ee2 100644 --- a/sound/pci/ca0106/ca0106_main.c +++ b/sound/pci/ca0106/ca0106_main.c @@ -1885,7 +1885,7 @@ static int snd_ca0106_probe(struct pci_dev *pci, goto error; dev_dbg(card->dev, " done.\n");
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS snd_ca0106_proc_init(chip); #endif
diff --git a/sound/pci/ca0106/ca0106_proc.c b/sound/pci/ca0106/ca0106_proc.c index 2c5c28adbefd..9b2b8b38122f 100644 --- a/sound/pci/ca0106/ca0106_proc.c +++ b/sound/pci/ca0106/ca0106_proc.c @@ -75,8 +75,6 @@ #include "ca0106.h"
-#ifdef CONFIG_PROC_FS - struct snd_ca0106_category_str { int val; const char *name; @@ -453,5 +451,3 @@ int snd_ca0106_proc_init(struct snd_ca0106 *emu) snd_info_set_text_ops(entry, emu, snd_ca0106_proc_reg_read2); return 0; } - -#endif /* CONFIG_PROC_FS */
Replaced with the new CONFIG_SND_PROC_FS.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- sound/pci/cs46xx/cs46xx_lib.h | 4 ++-- sound/pci/cs46xx/dsp_spos.c | 4 ++-- sound/pci/cs46xx/dsp_spos_scb_lib.c | 6 +++--- 4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/sound/pci/cs46xx/cs46xx_lib.c b/sound/pci/cs46xx/cs46xx_lib.c index 8d74004b1ed2..2a9f4a345171 100644 --- a/sound/pci/cs46xx/cs46xx_lib.c +++ b/sound/pci/cs46xx/cs46xx_lib.c @@ -2816,7 +2816,7 @@ int snd_cs46xx_gameport(struct snd_cs46xx *chip) { return -ENOSYS; } static inline void snd_cs46xx_remove_gameport(struct snd_cs46xx *chip) { } #endif /* CONFIG_GAMEPORT */
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS /* * proc interface */ @@ -2865,7 +2865,7 @@ static int snd_cs46xx_proc_done(struct snd_cs46xx *chip) #endif return 0; } -#else /* !CONFIG_PROC_FS */ +#else /* !CONFIG_SND_PROC_FS */ #define snd_cs46xx_proc_init(card, chip) #define snd_cs46xx_proc_done(chip) #endif diff --git a/sound/pci/cs46xx/cs46xx_lib.h b/sound/pci/cs46xx/cs46xx_lib.h index 86f14620f817..bdf4114167ea 100644 --- a/sound/pci/cs46xx/cs46xx_lib.h +++ b/sound/pci/cs46xx/cs46xx_lib.h @@ -95,7 +95,7 @@ int cs46xx_dsp_resume(struct snd_cs46xx * chip); #endif struct dsp_symbol_entry *cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, int symbol_type); -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS int cs46xx_dsp_proc_init (struct snd_card *card, struct snd_cs46xx *chip); int cs46xx_dsp_proc_done (struct snd_cs46xx *chip); #else @@ -118,7 +118,7 @@ int cs46xx_dsp_disable_adc_capture (struct snd_cs46xx *chip); int cs46xx_poke_via_dsp (struct snd_cs46xx *chip, u32 address, u32 data); struct dsp_scb_descriptor * cs46xx_dsp_create_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest); -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb); void cs46xx_dsp_proc_register_scb_desc (struct snd_cs46xx *chip, struct dsp_scb_descriptor * scb); diff --git a/sound/pci/cs46xx/dsp_spos.c b/sound/pci/cs46xx/dsp_spos.c index 5c99efb004c0..d2951ed4bf71 100644 --- a/sound/pci/cs46xx/dsp_spos.c +++ b/sound/pci/cs46xx/dsp_spos.c @@ -476,7 +476,7 @@ cs46xx_dsp_lookup_symbol (struct snd_cs46xx * chip, char * symbol_name, int symb }
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS static struct dsp_symbol_entry * cs46xx_dsp_lookup_symbol_addr (struct snd_cs46xx * chip, u32 address, int symbol_type) { @@ -929,7 +929,7 @@ int cs46xx_dsp_proc_done (struct snd_cs46xx *chip)
return 0; } -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_SND_PROC_FS */
static void _dsp_create_task_tree (struct snd_cs46xx *chip, u32 * task_data, u32 dest, int size) diff --git a/sound/pci/cs46xx/dsp_spos_scb_lib.c b/sound/pci/cs46xx/dsp_spos_scb_lib.c index 2c90c0bded69..7488e1b7a770 100644 --- a/sound/pci/cs46xx/dsp_spos_scb_lib.c +++ b/sound/pci/cs46xx/dsp_spos_scb_lib.c @@ -67,7 +67,7 @@ static void remove_symbol (struct snd_cs46xx * chip, struct dsp_symbol_entry * s
}
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS static void cs46xx_dsp_proc_scb_info_read (struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -228,7 +228,7 @@ void cs46xx_dsp_remove_scb (struct snd_cs46xx *chip, struct dsp_scb_descriptor * }
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS void cs46xx_dsp_proc_free_scb_desc (struct dsp_scb_descriptor * scb) { if (scb->proc_info) { @@ -285,7 +285,7 @@ out: scb->proc_info = entry; } } -#endif /* CONFIG_PROC_FS */ +#endif /* CONFIG_SND_PROC_FS */
static struct dsp_scb_descriptor * _dsp_create_generic_scb (struct snd_cs46xx *chip, char * name, u32 * scb_data, u32 dest,
Build emuproc.o conditionally and drop the unneeded ifdefs. Some are replaced with the new CONFIG_SND_PROC_FS.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/emu10k1/Makefile | 3 ++- sound/pci/emu10k1/emu10k1_main.c | 2 +- sound/pci/emu10k1/emuproc.c | 2 -- 3 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/sound/pci/emu10k1/Makefile b/sound/pci/emu10k1/Makefile index fc5591e7777e..29b44ca27010 100644 --- a/sound/pci/emu10k1/Makefile +++ b/sound/pci/emu10k1/Makefile @@ -5,7 +5,8 @@
snd-emu10k1-objs := emu10k1.o emu10k1_main.o \ irq.o memory.o voice.o emumpu401.o emupcm.o io.o \ - emuproc.o emumixer.o emufx.o timer.o p16v.o + emumixer.o emufx.o timer.o p16v.o +snd-emu10k1-$(CONFIG_SND_PROC_FS) += emuproc.o snd-emu10k1-synth-objs := emu10k1_synth.o emu10k1_callback.o emu10k1_patch.o snd-emu10k1x-objs := emu10k1x.o
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c index 54219fd662a1..28e2f8b42f5e 100644 --- a/sound/pci/emu10k1/emu10k1_main.c +++ b/sound/pci/emu10k1/emu10k1_main.c @@ -2063,7 +2063,7 @@ int snd_emu10k1_create(struct snd_card *card, if (err < 0) goto error;
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS snd_emu10k1_proc_init(emu); #endif
diff --git a/sound/pci/emu10k1/emuproc.c b/sound/pci/emu10k1/emuproc.c index 53745f4c2bf5..cf05229b569b 100644 --- a/sound/pci/emu10k1/emuproc.c +++ b/sound/pci/emu10k1/emuproc.c @@ -34,7 +34,6 @@ #include <sound/emu10k1.h> #include "p16v.h"
-#ifdef CONFIG_PROC_FS static void snd_emu10k1_proc_spdif_status(struct snd_emu10k1 * emu, struct snd_info_buffer *buffer, char *title, @@ -656,4 +655,3 @@ int snd_emu10k1_proc_init(struct snd_emu10k1 *emu) } return 0; } -#endif /* CONFIG_PROC_FS */
Build emux_proc.o and drop the unneeded ifdefs. Replace the left CONFIG_PROC with the new CONFIG_SND_PROC_FS.
Along with this, fix the build of emux_oss.o in Makefile, too.
Signed-off-by: Takashi Iwai tiwai@suse.de --- include/sound/emux_synth.h | 2 +- sound/synth/emux/Makefile | 5 +++-- sound/synth/emux/emux.c | 4 ---- sound/synth/emux/emux_proc.c | 4 ---- sound/synth/emux/emux_voice.h | 6 +++++- 5 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/include/sound/emux_synth.h b/include/sound/emux_synth.h index fb81f3722b6a..a0a40b74bf13 100644 --- a/include/sound/emux_synth.h +++ b/include/sound/emux_synth.h @@ -125,7 +125,7 @@ struct snd_emux {
struct snd_util_memhdr *memhdr; /* memory chunk information */
-#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS struct snd_info_entry *proc; #endif
diff --git a/sound/synth/emux/Makefile b/sound/synth/emux/Makefile index 328594e6152d..fb761c2c2b50 100644 --- a/sound/synth/emux/Makefile +++ b/sound/synth/emux/Makefile @@ -4,8 +4,9 @@ #
snd-emux-synth-objs := emux.o emux_synth.o emux_seq.o emux_nrpn.o \ - emux_effect.o emux_proc.o emux_hwdep.o soundfont.o \ - $(if $(CONFIG_SND_SEQUENCER_OSS),emux_oss.o) + emux_effect.o emux_hwdep.o soundfont.o +snd-emux-synth-$(CONFIG_SND_PROC_FS) += emux_proc.o +snd-emux-synth-$(CONFIG_SND_SEQUENCER_OSS) += emux_oss.o
# Toplevel Module Dependencies obj-$(CONFIG_SND_SBAWE_SEQ) += snd-emux-synth.o diff --git a/sound/synth/emux/emux.c b/sound/synth/emux/emux.c index 49195325fdf6..9312cd8a6fdd 100644 --- a/sound/synth/emux/emux.c +++ b/sound/synth/emux/emux.c @@ -128,9 +128,7 @@ int snd_emux_register(struct snd_emux *emu, struct snd_card *card, int index, ch #endif snd_emux_init_virmidi(emu, card);
-#ifdef CONFIG_PROC_FS snd_emux_proc_init(emu, card, index); -#endif return 0; }
@@ -150,9 +148,7 @@ int snd_emux_free(struct snd_emux *emu) del_timer(&emu->tlist); spin_unlock_irqrestore(&emu->voice_lock, flags);
-#ifdef CONFIG_PROC_FS snd_emux_proc_free(emu); -#endif snd_emux_delete_virmidi(emu); #ifdef CONFIG_SND_SEQUENCER_OSS snd_emux_detach_seq_oss(emu); diff --git a/sound/synth/emux/emux_proc.c b/sound/synth/emux/emux_proc.c index 58a32a10d115..a82b4053bee8 100644 --- a/sound/synth/emux/emux_proc.c +++ b/sound/synth/emux/emux_proc.c @@ -24,8 +24,6 @@ #include <sound/info.h> #include "emux_voice.h"
-#ifdef CONFIG_PROC_FS - static void snd_emux_proc_info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf) @@ -128,5 +126,3 @@ void snd_emux_proc_free(struct snd_emux *emu) snd_info_free_entry(emu->proc); emu->proc = NULL; } - -#endif /* CONFIG_PROC_FS */ diff --git a/sound/synth/emux/emux_voice.h b/sound/synth/emux/emux_voice.h index 09711f84ed30..a7073c371bcc 100644 --- a/sound/synth/emux/emux_voice.h +++ b/sound/synth/emux/emux_voice.h @@ -82,9 +82,13 @@ void snd_emux_init_seq_oss(struct snd_emux *emu); void snd_emux_detach_seq_oss(struct snd_emux *emu);
/* emux_proc.c */ -#ifdef CONFIG_PROC_FS +#ifdef CONFIG_SND_PROC_FS void snd_emux_proc_init(struct snd_emux *emu, struct snd_card *card, int device); void snd_emux_proc_free(struct snd_emux *emu); +#else +static inline void snd_emux_proc_init(struct snd_emux *emu, + struct snd_card *card, int device) {} +static inline void snd_emux_proc_free(struct snd_emux *emu) {} #endif
#define STATE_IS_PLAYING(s) ((s) & SNDRV_EMUX_ST_ON)
The compiler can optimize the unused code away, so we can drop ifdefs.
Signed-off-by: Takashi Iwai tiwai@suse.de --- sound/pci/ak4531_codec.c | 6 ------ sound/pci/atiixp.c | 4 ---- sound/pci/atiixp_modem.c | 4 ---- sound/pci/cmipci.c | 5 ----- sound/pci/ice1712/quartet.c | 7 +------ sound/pci/intel8x0.c | 4 ---- sound/pci/intel8x0m.c | 5 ----- sound/pci/oxygen/oxygen_lib.c | 4 ---- 8 files changed, 1 insertion(+), 38 deletions(-)
diff --git a/sound/pci/ak4531_codec.c b/sound/pci/ak4531_codec.c index 3bf0dc53360a..2fb1fbba3e5e 100644 --- a/sound/pci/ak4531_codec.c +++ b/sound/pci/ak4531_codec.c @@ -35,11 +35,7 @@ MODULE_DESCRIPTION("Universal routines for AK4531 codec"); MODULE_LICENSE("GPL"); */
-#ifdef CONFIG_PROC_FS static void snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531); -#else -#define snd_ak4531_proc_init(card,ak) -#endif
/* * @@ -466,7 +462,6 @@ void snd_ak4531_resume(struct snd_ak4531 *ak4531) } #endif
-#ifdef CONFIG_PROC_FS /* * /proc interface */ @@ -491,4 +486,3 @@ snd_ak4531_proc_init(struct snd_card *card, struct snd_ak4531 *ak4531) if (! snd_card_proc_new(card, "ak4531", &entry)) snd_info_set_text_ops(entry, ak4531, snd_ak4531_proc_read); } -#endif diff --git a/sound/pci/atiixp.c b/sound/pci/atiixp.c index 42a20c806b39..1028fc8bdff5 100644 --- a/sound/pci/atiixp.c +++ b/sound/pci/atiixp.c @@ -1530,7 +1530,6 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume); #endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_PROC_FS /* * proc interface for register dump */ @@ -1552,9 +1551,6 @@ static void snd_atiixp_proc_init(struct atiixp *chip) if (! snd_card_proc_new(chip->card, "atiixp", &entry)) snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); } -#else /* !CONFIG_PROC_FS */ -#define snd_atiixp_proc_init(chip) -#endif
/* diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c index 0a38e08164ab..27ed678a46df 100644 --- a/sound/pci/atiixp_modem.c +++ b/sound/pci/atiixp_modem.c @@ -1156,7 +1156,6 @@ static SIMPLE_DEV_PM_OPS(snd_atiixp_pm, snd_atiixp_suspend, snd_atiixp_resume); #define SND_ATIIXP_PM_OPS NULL #endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_PROC_FS /* * proc interface for register dump */ @@ -1178,9 +1177,6 @@ static void snd_atiixp_proc_init(struct atiixp_modem *chip) if (! snd_card_proc_new(chip->card, "atiixp-modem", &entry)) snd_info_set_text_ops(entry, chip, snd_atiixp_proc_read); } -#else -#define snd_atiixp_proc_init(chip) -#endif
/* diff --git a/sound/pci/cmipci.c b/sound/pci/cmipci.c index 6cf464d9043d..24cdcba06d27 100644 --- a/sound/pci/cmipci.c +++ b/sound/pci/cmipci.c @@ -2772,7 +2772,6 @@ static int snd_cmipci_mixer_new(struct cmipci *cm, int pcm_spdif_device) * proc interface */
-#ifdef CONFIG_PROC_FS static void snd_cmipci_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -2798,10 +2797,6 @@ static void snd_cmipci_proc_init(struct cmipci *cm) if (! snd_card_proc_new(cm->card, "cmipci", &entry)) snd_info_set_text_ops(entry, cm, snd_cmipci_proc_read); } -#else /* !CONFIG_PROC_FS */ -static inline void snd_cmipci_proc_init(struct cmipci *cm) {} -#endif -
static const struct pci_device_id snd_cmipci_ids[] = { {PCI_VDEVICE(CMEDIA, PCI_DEVICE_ID_CMEDIA_CM8338A), 0}, diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c index 6f55e02e5c84..7c387b04067e 100644 --- a/sound/pci/ice1712/quartet.c +++ b/sound/pci/ice1712/quartet.c @@ -203,7 +203,6 @@ static const char * const ext_clock_names[3] = {"IEC958 In", "Word Clock 1xFS", #define AK4620_DEEMVOL_REG 0x03 #define AK4620_SMUTE (1<<7)
-#ifdef CONFIG_PROC_FS /* * Conversion from int value to its binary form. Used for debugging. * The output buffer must be allocated prior to calling the function. @@ -228,7 +227,6 @@ static char *get_binary(char *buffer, int value) buffer[pos] = '\0'; return buffer; } -#endif /* CONFIG_PROC_FS */
/* * Initial setup of the conversion array GPIO <-> rate @@ -486,7 +484,7 @@ static void set_cpld(struct snd_ice1712 *ice, unsigned int val) reg_write(ice, GPIO_CPLD_CSN, val); spec->cpld = val; } -#ifdef CONFIG_PROC_FS + static void proc_regs_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -507,9 +505,6 @@ static void proc_init(struct snd_ice1712 *ice) if (!snd_card_proc_new(ice->card, "quartet", &entry)) snd_info_set_text_ops(entry, ice, proc_regs_read); } -#else /* !CONFIG_PROC_FS */ -static void proc_init(struct snd_ice1712 *ice) {} -#endif
static int qtet_mute_get(struct snd_kcontrol *kcontrol, struct snd_ctl_elem_value *ucontrol) diff --git a/sound/pci/intel8x0.c b/sound/pci/intel8x0.c index b120925223ae..42bcbac801a3 100644 --- a/sound/pci/intel8x0.c +++ b/sound/pci/intel8x0.c @@ -2900,7 +2900,6 @@ static int intel8x0_in_clock_list(struct intel8x0 *chip) return 1; }
-#ifdef CONFIG_PROC_FS static void snd_intel8x0_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffer) { @@ -2942,9 +2941,6 @@ static void snd_intel8x0_proc_init(struct intel8x0 *chip) if (! snd_card_proc_new(chip->card, "intel8x0", &entry)) snd_info_set_text_ops(entry, chip, snd_intel8x0_proc_read); } -#else -#define snd_intel8x0_proc_init(x) -#endif
static int snd_intel8x0_dev_free(struct snd_device *device) { diff --git a/sound/pci/intel8x0m.c b/sound/pci/intel8x0m.c index 7577f31cd504..1bc98c867133 100644 --- a/sound/pci/intel8x0m.c +++ b/sound/pci/intel8x0m.c @@ -1065,7 +1065,6 @@ static SIMPLE_DEV_PM_OPS(intel8x0m_pm, intel8x0m_suspend, intel8x0m_resume); #define INTEL8X0M_PM_OPS NULL #endif /* CONFIG_PM_SLEEP */
-#ifdef CONFIG_PROC_FS static void snd_intel8x0m_proc_read(struct snd_info_entry * entry, struct snd_info_buffer *buffer) { @@ -1093,10 +1092,6 @@ static void snd_intel8x0m_proc_init(struct intel8x0m *chip) if (! snd_card_proc_new(chip->card, "intel8x0m", &entry)) snd_info_set_text_ops(entry, chip, snd_intel8x0m_proc_read); } -#else /* !CONFIG_PROC_FS */ -#define snd_intel8x0m_proc_init(chip) -#endif /* CONFIG_PROC_FS */ -
static int snd_intel8x0m_dev_free(struct snd_device *device) { diff --git a/sound/pci/oxygen/oxygen_lib.c b/sound/pci/oxygen/oxygen_lib.c index ffff3b25fd73..b4ef5804212d 100644 --- a/sound/pci/oxygen/oxygen_lib.c +++ b/sound/pci/oxygen/oxygen_lib.c @@ -196,7 +196,6 @@ static void oxygen_gpio_changed(struct work_struct *work) chip->model.gpio_changed(chip); }
-#ifdef CONFIG_PROC_FS static void oxygen_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffer) { @@ -250,9 +249,6 @@ static void oxygen_proc_init(struct oxygen *chip) if (!snd_card_proc_new(chip->card, "oxygen", &entry)) snd_info_set_text_ops(entry, chip, oxygen_proc_read); } -#else -#define oxygen_proc_init(chip) -#endif
static const struct pci_device_id * oxygen_search_pci_id(struct oxygen *chip, const struct pci_device_id ids[])
-----Original Message----- From: alsa-devel-bounces@alsa-project.org [mailto:alsa-devel- bounces@alsa-project.org] On Behalf Of Takashi Iwai Sent: Friday, May 29, 2015 2:06 PM To: alsa-devel@alsa-project.org Subject: [alsa-devel] [PATCH 00/10] Leftover CONFIG_PROC_FS fixes & cleanups
Hi,
here is a patch series to fix / clean up the leftover CONFIG_PROC_FS after Keyon's patch to introduce CONFIG_SND_PROC_FS.
Sorry about those leftovers, Takashi. :(
~Keyon
Takashi
===
Takashi Iwai (10): ALSA: aloop: Drop unnecessary ifdef CONFIG_PROC_FS ALSA: dummy: Replace CONFIG_PROC_FS with CONFIG_SND_PROC_FS ALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FS ALSA: ak4xxx-adda: Drop unnecessary ifdef CONFIG_PROC_FS ALSA: ac97: Fix ifdef CONFIG_PROC_FS ALSA: ca0106: Fix/cleanup ifdef CONFIG_PROC_FS ALSA: cs46xx: Fix old ifdef CONFIG_PROC_FS ALSA: emu10k1: Fix/cleanup ifdef CONFIG_PROC_FS ALSA: emux: Fix/cleanup old ifdef CONFIG_PROC_FS ALSA: pci: Drop superfluous ifdef CONFIG_PROC_FS
include/sound/emux_synth.h | 2 +- sound/drivers/aloop.c | 8 -------- sound/drivers/dummy.c | 4 ++-- sound/drivers/opl4/Makefile | 3 ++- sound/drivers/opl4/opl4_lib.c | 4 ---- sound/drivers/opl4/opl4_local.h | 7 +++++-- sound/drivers/opl4/opl4_proc.c | 4 ---- sound/i2c/other/ak4xxx-adda.c | 4 ---- sound/pci/ac97/Makefile | 2 +- sound/pci/ac97/ac97_local.h | 2 +- sound/pci/ak4531_codec.c | 6 ------ sound/pci/atiixp.c | 4 ---- sound/pci/atiixp_modem.c | 4 ---- sound/pci/ca0106/Makefile | 3 ++- sound/pci/ca0106/ca0106_main.c | 2 +- sound/pci/ca0106/ca0106_proc.c | 4 ---- sound/pci/cmipci.c | 5 ----- sound/pci/cs46xx/cs46xx_lib.c | 4 ++-- sound/pci/cs46xx/cs46xx_lib.h | 4 ++-- sound/pci/cs46xx/dsp_spos.c | 4 ++-- sound/pci/cs46xx/dsp_spos_scb_lib.c | 6 +++--- sound/pci/emu10k1/Makefile | 3 ++- sound/pci/emu10k1/emu10k1_main.c | 2 +- sound/pci/emu10k1/emuproc.c | 2 -- sound/pci/ice1712/quartet.c | 7 +------ sound/pci/intel8x0.c | 4 ---- sound/pci/intel8x0m.c | 5 ----- sound/pci/oxygen/oxygen_lib.c | 4 ---- sound/synth/emux/Makefile | 5 +++-- sound/synth/emux/emux.c | 4 ---- sound/synth/emux/emux_proc.c | 4 ---- sound/synth/emux/emux_voice.h | 6 +++++- 32 files changed, 36 insertions(+), 96 deletions(-)
-- 2.4.2
Alsa-devel mailing list Alsa-devel@alsa-project.org http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Jie, Yang
-
Takashi Iwai