Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 2e2d4cb4 authored by Takashi Iwai's avatar Takashi Iwai
Browse files

ALSA: opl4: Use IS_REACHABLE()



Rewrite the complex ifdef condition with IS_REACHABLE().
The ifdef in opl4_local.h was without defined(MODLE) check, but this
is likely the oversight.  Use IS_REACHABLE() here as well.

Acked-by: default avatarClemens Ladisch <clemens@ladisch.de>
Signed-off-by: default avatarTakashi Iwai <tiwai@suse.de>
parent 88faa384
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -153,7 +153,7 @@ static int snd_opl4_detect(struct snd_opl4 *opl4)
	return 0;
	return 0;
}
}


#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
static void snd_opl4_seq_dev_free(struct snd_seq_device *seq_dev)
static void snd_opl4_seq_dev_free(struct snd_seq_device *seq_dev)
{
{
	struct snd_opl4 *opl4 = seq_dev->private_data;
	struct snd_opl4 *opl4 = seq_dev->private_data;
@@ -249,7 +249,7 @@ int snd_opl4_create(struct snd_card *card,
	snd_opl4_create_mixer(opl4);
	snd_opl4_create_mixer(opl4);
	snd_opl4_create_proc(opl4);
	snd_opl4_create_proc(opl4);


#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
	opl4->seq_client = -1;
	opl4->seq_client = -1;
	if (opl4->hardware < OPL3_HW_OPL4_ML)
	if (opl4->hardware < OPL3_HW_OPL4_ML)
		snd_opl4_create_seq_dev(opl4, seq_device);
		snd_opl4_create_seq_dev(opl4, seq_device);
+1 −1
Original line number Original line Diff line number Diff line
@@ -184,7 +184,7 @@ struct snd_opl4 {
#endif
#endif
	struct mutex access_mutex;
	struct mutex access_mutex;


#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
	int used;
	int used;


	int seq_dev_num;
	int seq_dev_num;