From patchwork Thu Apr 23 14:49:29 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Takashi Iwai X-Patchwork-Id: 6263801 Return-Path: X-Original-To: patchwork-alsa-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 41901BF4A6 for ; Thu, 23 Apr 2015 14:53:57 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 5C3B02025A for ; Thu, 23 Apr 2015 14:53:56 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) by mail.kernel.org (Postfix) with ESMTP id 7B06A2025B for ; Thu, 23 Apr 2015 14:53:50 +0000 (UTC) Received: by alsa0.perex.cz (Postfix, from userid 1000) id AFAC426671E; Thu, 23 Apr 2015 16:53:49 +0200 (CEST) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from alsa0.perex.cz (localhost [IPv6:::1]) by alsa0.perex.cz (Postfix) with ESMTP id 01BF0266630; Thu, 23 Apr 2015 16:49:59 +0200 (CEST) X-Original-To: alsa-devel@alsa-project.org Delivered-To: alsa-devel@alsa-project.org Received: by alsa0.perex.cz (Postfix, from userid 1000) id 3A5E8265AA1; Thu, 23 Apr 2015 16:49:56 +0200 (CEST) Received: from mx2.suse.de (cantor2.suse.de [195.135.220.15]) by alsa0.perex.cz (Postfix) with ESMTP id 8BE9B265A78 for ; Thu, 23 Apr 2015 16:49:38 +0200 (CEST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 29E6FAD6D for ; Thu, 23 Apr 2015 14:49:38 +0000 (UTC) From: Takashi Iwai To: alsa-devel@alsa-project.org Date: Thu, 23 Apr 2015 16:49:29 +0200 Message-Id: <1429800570-10153-8-git-send-email-tiwai@suse.de> X-Mailer: git-send-email 2.3.5 In-Reply-To: <1429800570-10153-1-git-send-email-tiwai@suse.de> References: <1429800570-10153-1-git-send-email-tiwai@suse.de> Subject: [alsa-devel] [PATCH 7/8] ALSA: core: Build conditionally and remove superfluous ifdefs X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org X-Virus-Scanned: ClamAV using ClamSMTP Minor cleanups of Makefile to build some codes conditionally so that a few ifdefs can be reduced. Signed-off-by: Takashi Iwai --- sound/core/Makefile | 8 ++++++-- sound/core/info.c | 8 -------- sound/core/info_oss.c | 4 ---- sound/core/seq/Makefile | 3 ++- sound/core/seq/seq_info.c | 2 -- sound/core/sound_oss.c | 8 -------- 6 files changed, 8 insertions(+), 25 deletions(-) diff --git a/sound/core/Makefile b/sound/core/Makefile index 4daf2f58261c..ae1d32b084fd 100644 --- a/sound/core/Makefile +++ b/sound/core/Makefile @@ -3,9 +3,13 @@ # Copyright (c) 1999,2001 by Jaroslav Kysela # -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 diff --git a/sound/core/info.c b/sound/core/info.c index 4169062fabf5..f8bdd9b6f322 100644 --- a/sound/core/info.c +++ b/sound/core/info.c @@ -33,12 +33,6 @@ #include #include -/* - * - */ - -#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 */ diff --git a/sound/core/info_oss.c b/sound/core/info_oss.c index 83c29dbff9c0..bd4d2c6233c2 100644 --- a/sound/core/info_oss.c +++ b/sound/core/info_oss.c @@ -29,8 +29,6 @@ #include #include -#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 */ diff --git a/sound/core/seq/Makefile b/sound/core/seq/Makefile index 941f64a853eb..b29ffe835205 100644 --- a/sound/core/seq/Makefile +++ b/sound/core/seq/Makefile @@ -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 diff --git a/sound/core/seq/seq_info.c b/sound/core/seq/seq_info.c index d3c65e780e9e..97015447b9b3 100644 --- a/sound/core/seq/seq_info.c +++ b/sound/core/seq/seq_info.c @@ -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 diff --git a/sound/core/sound_oss.c b/sound/core/sound_oss.c index 56d2f409f1ef..86e2d91dd375 100644 --- a/sound/core/sound_oss.c +++ b/sound/core/sound_oss.c @@ -19,12 +19,6 @@ * */ -#ifdef CONFIG_SND_OSSEMUL - -#if !IS_ENABLED(CONFIG_SOUND) -#error "Enable the OSS soundcore multiplexer (CONFIG_SOUND) in the kernel." -#endif - #include #include #include @@ -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 */