Skip to content

Commit 6d2412b

Browse files
committed
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>
1 parent 58f30d6 commit 6d2412b

5 files changed

Lines changed: 13 additions & 13 deletions

File tree

‎include/sound/core.h‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ struct snd_card {
142142
wait_queue_head_t power_sleep;
143143
#endif
144144

145-
#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
145+
#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
146146
struct snd_mixer_oss *mixer_oss;
147147
int mixer_oss_change_count;
148148
#endif
@@ -243,7 +243,7 @@ int copy_from_user_toio(volatile void __iomem *dst, const void __user *src, size
243243

244244
extern struct snd_card *snd_cards[SNDRV_CARDS];
245245
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)
247247
#define SND_MIXER_OSS_NOTIFY_REGISTER 0
248248
#define SND_MIXER_OSS_NOTIFY_DISCONNECT 1
249249
#define SND_MIXER_OSS_NOTIFY_FREE 2
@@ -394,7 +394,7 @@ static inline void snd_printdd(const char *format, ...) {}
394394
#define SNDRV_OSS_VERSION ((3<<16)|(8<<8)|(1<<4)|(0)) /* 3.8.1a */
395395

396396
/* for easier backward-porting */
397-
#if defined(CONFIG_GAMEPORT) || defined(CONFIG_GAMEPORT_MODULE)
397+
#if IS_ENABLED(CONFIG_GAMEPORT)
398398
#define gameport_set_dev_parent(gp,xdev) ((gp)->dev.parent = (xdev))
399399
#define gameport_set_port_data(gp,r) ((gp)->port_data = (r))
400400
#define gameport_get_port_data(gp) (gp)->port_data

‎include/sound/mixer_oss.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
*
2323
*/
2424

25-
#if defined(CONFIG_SND_MIXER_OSS) || defined(CONFIG_SND_MIXER_OSS_MODULE)
25+
#if IS_ENABLED(CONFIG_SND_MIXER_OSS)
2626

2727
#define SNDRV_OSS_MAX_MIXERS 32
2828

‎include/sound/opl3.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ struct snd_opl3 {
321321
unsigned char fm_mode; /* OPL mode, see SNDRV_DM_FM_MODE_XXX */
322322
unsigned char rhythm; /* percussion mode flag */
323323
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)
325325
#define SNDRV_OPL3_MODE_SYNTH 0 /* OSS - voices allocated by application */
326326
#define SNDRV_OPL3_MODE_SEQ 1 /* ALSA - driver handles voice allocation */
327327
int synth_mode; /* synth mode */
@@ -374,7 +374,7 @@ int snd_opl3_release(struct snd_hwdep * hw, struct file *file);
374374

375375
void snd_opl3_reset(struct snd_opl3 * opl3);
376376

377-
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
377+
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
378378
long snd_opl3_write(struct snd_hwdep *hw, const char __user *buf, long count,
379379
loff_t *offset);
380380
int snd_opl3_load_patch(struct snd_opl3 *opl3,

‎include/sound/pcm.h‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
#define snd_pcm_substream_chip(substream) ((substream)->private_data)
3535
#define snd_pcm_chip(pcm) ((pcm)->private_data)
3636

37-
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
37+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
3838
#include <sound/pcm_oss.h>
3939
#endif
4040

@@ -418,7 +418,7 @@ struct snd_pcm_runtime {
418418
struct snd_pcm_audio_tstamp_report audio_tstamp_report;
419419
struct timespec driver_tstamp;
420420

421-
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
421+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
422422
/* -- OSS things -- */
423423
struct snd_pcm_oss_runtime oss;
424424
#endif
@@ -464,7 +464,7 @@ struct snd_pcm_substream {
464464
unsigned int f_flags;
465465
void (*pcm_release)(struct snd_pcm_substream *);
466466
struct pid *pid;
467-
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
467+
#if IS_ENABLED(CONFIG_SND_PCM_OSS)
468468
/* -- OSS things -- */
469469
struct snd_pcm_oss_substream oss;
470470
#endif
@@ -494,7 +494,7 @@ struct snd_pcm_str {
494494
unsigned int substream_count;
495495
unsigned int substream_opened;
496496
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)
498498
/* -- OSS things -- */
499499
struct snd_pcm_oss_stream oss;
500500
#endif
@@ -526,7 +526,7 @@ struct snd_pcm {
526526
void (*private_free) (struct snd_pcm *pcm);
527527
bool internal; /* pcm is for internal use only */
528528
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)
530530
struct snd_pcm_oss oss;
531531
#endif
532532
};

‎include/sound/rawmidi.h‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
#include <linux/workqueue.h>
3131
#include <linux/device.h>
3232

33-
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
33+
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
3434
#include <sound/seq_device.h>
3535
#endif
3636

@@ -144,7 +144,7 @@ struct snd_rawmidi {
144144

145145
struct snd_info_entry *proc_entry;
146146

147-
#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
147+
#if IS_ENABLED(CONFIG_SND_SEQUENCER)
148148
struct snd_seq_device *seq_dev;
149149
#endif
150150
};

0 commit comments

Comments
 (0)