]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ALSA: core: Build conditionally and remove superfluous ifdefs
authorTakashi Iwai <tiwai@suse.de>
Thu, 23 Apr 2015 08:34:34 +0000 (10:34 +0200)
committerTakashi Iwai <tiwai@suse.de>
Fri, 24 Apr 2015 15:31:07 +0000 (17:31 +0200)
Minor cleanups of Makefile to build some codes conditionally so that
a few ifdefs can be reduced.

Acked-by: Jaroslav Kysela <perex@perex.cz>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/Makefile
sound/core/info.c
sound/core/info_oss.c
sound/core/seq/Makefile
sound/core/seq/seq_info.c
sound/core/sound_oss.c

index 4daf2f58261ced168d2bd616bea7eeb1732e33e8..ae1d32b084fd79ef1a65a8433e785deba9793ca2 100644 (file)
@@ -3,9 +3,13 @@
 # Copyright (c) 1999,2001 by Jaroslav Kysela <perex@perex.cz>
 #
 
-snd-y     := sound.o init.o memory.o info.o control.o misc.o device.o
+snd-y     := sound.o init.o memory.o control.o misc.o device.o
+ifneq ($(CONFIG_PROC_FS),)
+snd-y += info.o
+snd-$(CONFIG_SND_OSSEMUL) += info_oss.o
+endif
 snd-$(CONFIG_ISA_DMA_API) += isadma.o
-snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o info_oss.o
+snd-$(CONFIG_SND_OSSEMUL) += sound_oss.o
 snd-$(CONFIG_SND_VMASTER) += vmaster.o
 snd-$(CONFIG_SND_KCTL_JACK) += ctljack.o
 snd-$(CONFIG_SND_JACK)   += jack.o
index 4169062fabf5cc2d548ea402481068f28e0eba11..f8bdd9b6f322b88ebc1d1e35ebc69a4e736c18fd 100644 (file)
 #include <linux/mutex.h>
 #include <stdarg.h>
 
-/*
- *
- */
-
-#ifdef CONFIG_PROC_FS
-
 int snd_info_check_reserved_words(const char *str)
 {
        static char *reserved[] =
@@ -850,5 +844,3 @@ static int __init snd_info_version_init(void)
        entry->c.text.read = snd_info_version_read;
        return snd_info_register(entry); /* freed in error path */
 }
-
-#endif /* CONFIG_PROC_FS */
index 83c29dbff9c00fda9124c5155db62fa59341f6a4..bd4d2c6233c20ba3e41dca751d01f8fbf2ca5b9a 100644 (file)
@@ -29,8 +29,6 @@
 #include <linux/utsname.h>
 #include <linux/mutex.h>
 
-#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)
-
 /*
  *  OSS compatible part
  */
@@ -134,5 +132,3 @@ int snd_info_minor_unregister(void)
        snd_sndstat_proc_entry = NULL;
        return 0;
 }
-
-#endif /* CONFIG_SND_OSSEMUL */
index 941f64a853ebea266d24141af7c4dc71a053165a..b29ffe8352056002ba0e9d60860e470d467726f2 100644 (file)
@@ -6,7 +6,8 @@
 snd-seq-device-objs := seq_device.o
 snd-seq-objs := seq.o seq_lock.o seq_clientmgr.o seq_memory.o seq_queue.o \
                 seq_fifo.o seq_prioq.o seq_timer.o \
-                seq_system.o seq_ports.o seq_info.o
+                seq_system.o seq_ports.o
+snd-seq-$(CONFIG_PROC_FS) += seq_info.o
 snd-seq-midi-objs := seq_midi.o
 snd-seq-midi-emul-objs := seq_midi_emul.o
 snd-seq-midi-event-objs := seq_midi_event.o
index d3c65e780e9ea20ec7aa239eca450be52d93f5c7..97015447b9b37856b642624a151892e7b2eb8d69 100644 (file)
@@ -27,7 +27,6 @@
 #include "seq_clientmgr.h"
 #include "seq_timer.h"
 
-#ifdef CONFIG_PROC_FS
 static struct snd_info_entry *queues_entry;
 static struct snd_info_entry *clients_entry;
 static struct snd_info_entry *timer_entry;
@@ -80,4 +79,3 @@ int __exit snd_seq_info_done(void)
        free_info_entries();
        return 0;
 }
-#endif
index 56d2f409f1efb67612754d4f370f8410454174df..86e2d91dd3750b3dc06e6aac31b782b052275ce5 100644 (file)
  *
  */
 
-#ifdef CONFIG_SND_OSSEMUL
-
-#if !IS_ENABLED(CONFIG_SOUND)
-#error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel."
-#endif
-
 #include <linux/init.h>
 #include <linux/export.h>
 #include <linux/slab.h>
@@ -266,5 +260,3 @@ int __init snd_minor_info_oss_init(void)
        return snd_info_register(entry); /* freed in error path */
 }
 #endif /* CONFIG_PROC_FS */
-
-#endif /* CONFIG_SND_OSSEMUL */