diff options
author | Takashi Iwai <tiwai@suse.de> | 2015-05-29 01:49:55 -0400 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2015-05-29 01:49:55 -0400 |
commit | c43a55d5b1c51436730e2f769f1b90add800a6f1 (patch) | |
tree | 80b1ebf52552b68f932503f73997e615cd2b102c /sound/drivers | |
parent | 129a4c9f829d3e2113ce4f2c67cd431b48b2abb7 (diff) |
ALSA: opl4: Fix / cleanup ifdef CONFIG_PROC_FS
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>
Diffstat (limited to 'sound/drivers')
-rw-r--r-- | sound/drivers/opl4/Makefile | 3 | ||||
-rw-r--r-- | sound/drivers/opl4/opl4_lib.c | 4 | ||||
-rw-r--r-- | sound/drivers/opl4/opl4_local.h | 7 | ||||
-rw-r--r-- | 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 @@ | |||
3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz> | 3 | # Copyright (c) 2001 by Jaroslav Kysela <perex@perex.cz> |
4 | # | 4 | # |
5 | 5 | ||
6 | snd-opl4-lib-objs := opl4_lib.o opl4_mixer.o opl4_proc.o | 6 | snd-opl4-lib-objs := opl4_lib.o opl4_mixer.o |
7 | snd-opl4-lib-$(CONFIG_SND_PROC_FS) += opl4_proc.o | ||
7 | snd-opl4-synth-objs := opl4_seq.o opl4_synth.o yrw801.o | 8 | snd-opl4-synth-objs := opl4_seq.o opl4_synth.o yrw801.o |
8 | 9 | ||
9 | obj-$(CONFIG_SND_OPL4_LIB) += snd-opl4-lib.o | 10 | 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) | |||
176 | 176 | ||
177 | static void snd_opl4_free(struct snd_opl4 *opl4) | 177 | static void snd_opl4_free(struct snd_opl4 *opl4) |
178 | { | 178 | { |
179 | #ifdef CONFIG_PROC_FS | ||
180 | snd_opl4_free_proc(opl4); | 179 | snd_opl4_free_proc(opl4); |
181 | #endif | ||
182 | release_and_free_resource(opl4->res_fm_port); | 180 | release_and_free_resource(opl4->res_fm_port); |
183 | release_and_free_resource(opl4->res_pcm_port); | 181 | release_and_free_resource(opl4->res_pcm_port); |
184 | kfree(opl4); | 182 | kfree(opl4); |
@@ -249,9 +247,7 @@ int snd_opl4_create(struct snd_card *card, | |||
249 | snd_opl4_enable_opl4(opl4); | 247 | snd_opl4_enable_opl4(opl4); |
250 | 248 | ||
251 | snd_opl4_create_mixer(opl4); | 249 | snd_opl4_create_mixer(opl4); |
252 | #ifdef CONFIG_PROC_FS | ||
253 | snd_opl4_create_proc(opl4); | 250 | snd_opl4_create_proc(opl4); |
254 | #endif | ||
255 | 251 | ||
256 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) | 252 | #if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE)) |
257 | opl4->seq_client = -1; | 253 | 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 { | |||
178 | spinlock_t reg_lock; | 178 | spinlock_t reg_lock; |
179 | struct snd_card *card; | 179 | struct snd_card *card; |
180 | 180 | ||
181 | #ifdef CONFIG_PROC_FS | 181 | #ifdef CONFIG_SND_PROC_FS |
182 | struct snd_info_entry *proc_entry; | 182 | struct snd_info_entry *proc_entry; |
183 | int memory_access; | 183 | int memory_access; |
184 | #endif | 184 | #endif |
@@ -207,10 +207,13 @@ void snd_opl4_write_memory(struct snd_opl4 *opl4, const char *buf, int offset, i | |||
207 | /* opl4_mixer.c */ | 207 | /* opl4_mixer.c */ |
208 | int snd_opl4_create_mixer(struct snd_opl4 *opl4); | 208 | int snd_opl4_create_mixer(struct snd_opl4 *opl4); |
209 | 209 | ||
210 | #ifdef CONFIG_PROC_FS | 210 | #ifdef CONFIG_SND_PROC_FS |
211 | /* opl4_proc.c */ | 211 | /* opl4_proc.c */ |
212 | int snd_opl4_create_proc(struct snd_opl4 *opl4); | 212 | int snd_opl4_create_proc(struct snd_opl4 *opl4); |
213 | void snd_opl4_free_proc(struct snd_opl4 *opl4); | 213 | void snd_opl4_free_proc(struct snd_opl4 *opl4); |
214 | #else | ||
215 | static inline int snd_opl4_create_proc(struct snd_opl4 *opl4) { return 0; } | ||
216 | static inline void snd_opl4_free_proc(struct snd_opl4 *opl4) {} | ||
214 | #endif | 217 | #endif |
215 | 218 | ||
216 | /* opl4_seq.c */ | 219 | /* 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 @@ | |||
22 | #include <linux/export.h> | 22 | #include <linux/export.h> |
23 | #include <sound/info.h> | 23 | #include <sound/info.h> |
24 | 24 | ||
25 | #ifdef CONFIG_PROC_FS | ||
26 | |||
27 | static int snd_opl4_mem_proc_open(struct snd_info_entry *entry, | 25 | static int snd_opl4_mem_proc_open(struct snd_info_entry *entry, |
28 | unsigned short mode, void **file_private_data) | 26 | unsigned short mode, void **file_private_data) |
29 | { | 27 | { |
@@ -129,5 +127,3 @@ void snd_opl4_free_proc(struct snd_opl4 *opl4) | |||
129 | { | 127 | { |
130 | snd_info_free_entry(opl4->proc_entry); | 128 | snd_info_free_entry(opl4->proc_entry); |
131 | } | 129 | } |
132 | |||
133 | #endif /* CONFIG_PROC_FS */ | ||