Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ALSA: Use IS_ENABLED() in common headers

Simplify the ifdef conditions with IS_ENABLED() macro in the common
sound headers. No functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>

+13 -13
+3 -3
include/sound/core.h
··· 142 142 wait_queue_head_t power_sleep; 143 143 #endif 144 144 145 - #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) 145 + #if IS_ENABLED(CONFIG_SND_MIXER_OSS) 146 146 struct snd_mixer_oss *mixer_oss; 147 147 int mixer_oss_change_count; 148 148 #endif ··· 243 243 244 244 extern struct snd_card *snd_cards[SNDRV_CARDS]; 245 245 int snd_card_locked(int card); 246 - #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) 246 + #if IS_ENABLED(CONFIG_SND_MIXER_OSS) 247 247 #define SND_MIXER_OSS_NOTIFY_REGISTER 0 248 248 #define SND_MIXER_OSS_NOTIFY_DISCONNECT 1 249 249 #define SND_MIXER_OSS_NOTIFY_FREE 2 ··· 394 394 #define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */ 395 395 396 396 /* for easier backward-porting */ 397 - #if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE) 397 + #if IS_ENABLED(CONFIG_GAMEPORT) 398 398 #define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev)) 399 399 #define gameport_set_port_data(gp,r) ((gp)->port_data = (r)) 400 400 #define gameport_get_port_data(gp) (gp)->port_data
+1 -1
include/sound/mixer_oss.h
··· 22 22 * 23 23 */ 24 24 25 - #if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE) 25 + #if IS_ENABLED(CONFIG_SND_MIXER_OSS) 26 26 27 27 #define SNDRV_OSS_MAX_MIXERS 32 28 28
+2 -2
include/sound/opl3.h
··· 321 321 unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */ 322 322 unsigned char rhythm; /* percussion mode flag */ 323 323 unsigned char max_voices; /* max number of voices */ 324 - #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 324 + #if IS_ENABLED(CONFIG_SND_SEQUENCER) 325 325 #define SNDRV_OPL3_MODE_SYNTH 0 /* OSS - voices allocated by application */ 326 326 #define SNDRV_OPL3_MODE_SEQ 1 /* ALSA - driver handles voice allocation */ 327 327 int synth_mode; /* synth mode */ ··· 374 374 375 375 void snd_opl3_reset(struct snd_opl3 * opl3); 376 376 377 - #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 377 + #if IS_ENABLED(CONFIG_SND_SEQUENCER) 378 378 long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count, 379 379 loff_t *offset); 380 380 int snd_opl3_load_patch(struct snd_opl3 *opl3,
+5 -5
include/sound/pcm.h
··· 34 34 #define snd_pcm_substream_chip(substream) ((substream)->private_data) 35 35 #define snd_pcm_chip(pcm) ((pcm)->private_data) 36 36 37 - #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 37 + #if IS_ENABLED(CONFIG_SND_PCM_OSS) 38 38 #include <sound/pcm_oss.h> 39 39 #endif 40 40 ··· 418 418 struct snd_pcm_audio_tstamp_report audio_tstamp_report; 419 419 struct timespec driver_tstamp; 420 420 421 - #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 421 + #if IS_ENABLED(CONFIG_SND_PCM_OSS) 422 422 /* -- OSS things -- */ 423 423 struct snd_pcm_oss_runtime oss; 424 424 #endif ··· 464 464 unsigned int f_flags; 465 465 void (*pcm_release)(struct snd_pcm_substream *); 466 466 struct pid *pid; 467 - #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 467 + #if IS_ENABLED(CONFIG_SND_PCM_OSS) 468 468 /* -- OSS things -- */ 469 469 struct snd_pcm_oss_substream oss; 470 470 #endif ··· 494 494 unsigned int substream_count; 495 495 unsigned int substream_opened; 496 496 struct snd_pcm_substream *substream; 497 - #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 497 + #if IS_ENABLED(CONFIG_SND_PCM_OSS) 498 498 /* -- OSS things -- */ 499 499 struct snd_pcm_oss_stream oss; 500 500 #endif ··· 526 526 void (*private_free) (struct snd_pcm *pcm); 527 527 bool internal; /* pcm is for internal use only */ 528 528 bool nonatomic; /* whole PCM operations are in non-atomic context */ 529 - #if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE) 529 + #if IS_ENABLED(CONFIG_SND_PCM_OSS) 530 530 struct snd_pcm_oss oss; 531 531 #endif 532 532 };
+2 -2
include/sound/rawmidi.h
··· 30 30 #include <linux/workqueue.h> 31 31 #include <linux/device.h> 32 32 33 - #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 33 + #if IS_ENABLED(CONFIG_SND_SEQUENCER) 34 34 #include <sound/seq_device.h> 35 35 #endif 36 36 ··· 144 144 145 145 struct snd_info_entry *proc_entry; 146 146 147 - #if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE) 147 + #if IS_ENABLED(CONFIG_SND_SEQUENCER) 148 148 struct snd_seq_device *seq_dev; 149 149 #endif 150 150 };