aboutsummaryrefslogtreecommitdiffstats
path: root/sound/core/pcm.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2014-02-10 03:48:47 -0500
committerTakashi Iwai <tiwai@suse.de>2014-02-10 05:42:00 -0500
commit8eeaa2f9e06dcfb45593a0fcd91e81abc7f5d209 (patch)
tree9edb1030921070d747288d4cea33dc8500dd1a5c /sound/core/pcm.c
parent0a11458cbbb81d044c8fc5a77a7584cd33f08c48 (diff)
ALSA: Replace with IS_ENABLED()
Replace the lengthy #if defined(XXX) || defined(XXX_MODULE) with the new IS_ENABLED() macro. The patch still doesn't cover all ifdefs. For example, the dependency on CONFIG_GAMEPORT is still open-coded because this also has an extra dependency on MODULE. Similarly, an open-coded ifdef in pcm_oss.c and some sequencer-related stuff are left untouched. Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/pcm.c')
-rw-r--r--sound/core/pcm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index e1e9e0c999fe..091a05c1d5b3 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -295,7 +295,7 @@ static const char *snd_pcm_state_name(snd_pcm_state_t state)
295 return snd_pcm_state_names[(__force int)state]; 295 return snd_pcm_state_names[(__force int)state];
296} 296}
297 297
298#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 298#if IS_ENABLED(CONFIG_SND_PCM_OSS)
299#include <linux/soundcard.h> 299#include <linux/soundcard.h>
300 300
301static const char *snd_pcm_oss_format_name(int format) 301static const char *snd_pcm_oss_format_name(int format)
@@ -398,7 +398,7 @@ static void snd_pcm_substream_proc_hw_params_read(struct snd_info_entry *entry,
398 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den); 398 snd_iprintf(buffer, "rate: %u (%u/%u)\n", runtime->rate, runtime->rate_num, runtime->rate_den);
399 snd_iprintf(buffer, "period_size: %lu\n", runtime->period_size); 399 snd_iprintf(buffer, "period_size: %lu\n", runtime->period_size);
400 snd_iprintf(buffer, "buffer_size: %lu\n", runtime->buffer_size); 400 snd_iprintf(buffer, "buffer_size: %lu\n", runtime->buffer_size);
401#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 401#if IS_ENABLED(CONFIG_SND_PCM_OSS)
402 if (substream->oss.oss) { 402 if (substream->oss.oss) {
403 snd_iprintf(buffer, "OSS format: %s\n", snd_pcm_oss_format_name(runtime->oss.format)); 403 snd_iprintf(buffer, "OSS format: %s\n", snd_pcm_oss_format_name(runtime->oss.format));
404 snd_iprintf(buffer, "OSS channels: %u\n", runtime->oss.channels); 404 snd_iprintf(buffer, "OSS channels: %u\n", runtime->oss.channels);
@@ -651,7 +651,7 @@ int snd_pcm_new_stream(struct snd_pcm *pcm, int stream, int substream_count)
651 struct snd_pcm_str *pstr = &pcm->streams[stream]; 651 struct snd_pcm_str *pstr = &pcm->streams[stream];
652 struct snd_pcm_substream *substream, *prev; 652 struct snd_pcm_substream *substream, *prev;
653 653
654#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 654#if IS_ENABLED(CONFIG_SND_PCM_OSS)
655 mutex_init(&pstr->oss.setup_mutex); 655 mutex_init(&pstr->oss.setup_mutex);
656#endif 656#endif
657 pstr->stream = stream; 657 pstr->stream = stream;
@@ -807,7 +807,7 @@ EXPORT_SYMBOL(snd_pcm_new_internal);
807static void snd_pcm_free_stream(struct snd_pcm_str * pstr) 807static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
808{ 808{
809 struct snd_pcm_substream *substream, *substream_next; 809 struct snd_pcm_substream *substream, *substream_next;
810#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 810#if IS_ENABLED(CONFIG_SND_PCM_OSS)
811 struct snd_pcm_oss_setup *setup, *setupn; 811 struct snd_pcm_oss_setup *setup, *setupn;
812#endif 812#endif
813 substream = pstr->substream; 813 substream = pstr->substream;
@@ -819,7 +819,7 @@ static void snd_pcm_free_stream(struct snd_pcm_str * pstr)
819 substream = substream_next; 819 substream = substream_next;
820 } 820 }
821 snd_pcm_stream_proc_done(pstr); 821 snd_pcm_stream_proc_done(pstr);
822#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 822#if IS_ENABLED(CONFIG_SND_PCM_OSS)
823 for (setup = pstr->oss.setup_list; setup; setup = setupn) { 823 for (setup = pstr->oss.setup_list; setup; setup = setupn) {
824 setupn = setup->next; 824 setupn = setup->next;
825 kfree(setup->task_name); 825 kfree(setup->task_name);