]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ALSA: opl4: Use IS_REACHABLE()
authorTakashi Iwai <tiwai@suse.de>
Fri, 12 May 2017 09:52:06 +0000 (11:52 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 17 May 2017 05:13:05 +0000 (07:13 +0200)
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: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/drivers/opl4/opl4_lib.c
sound/drivers/opl4/opl4_local.h

index 89c7aa04b3bcb7d65d811a3ca3ecd97779d7f49d..240656e54400bb8f1997b86909049c8badaea30b 100644 (file)
@@ -153,7 +153,7 @@ static int snd_opl4_detect(struct snd_opl4 *opl4)
        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)
 {
        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_proc(opl4);
 
-#if defined(CONFIG_SND_SEQUENCER) || (defined(MODULE) && defined(CONFIG_SND_SEQUENCER_MODULE))
+#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
        opl4->seq_client = -1;
        if (opl4->hardware < OPL3_HW_OPL4_ML)
                snd_opl4_create_seq_dev(opl4, seq_device);
index 9a41bdebce6b465415dcf7ae3895281231b99493..d5bac93f824502ae79d1c6d5cf2352ce66c80d20 100644 (file)
@@ -184,7 +184,7 @@ struct snd_opl4 {
 #endif
        struct mutex access_mutex;
 
-#if defined(CONFIG_SND_SEQUENCER) || defined(CONFIG_SND_SEQUENCER_MODULE)
+#if IS_REACHABLE(CONFIG_SND_SEQUENCER)
        int used;
 
        int seq_dev_num;