Skip to content

Commit

Permalink
ALSA: core: Build conditionally and remove superfluous ifdefs
Browse files Browse the repository at this point in the history
Minor cleanups of Makefile to build some codes conditionally so that
a few ifdefs can be reduced.

Acked-by: Jaroslav Kysela <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
  • Loading branch information
tiwai committed Apr 24, 2015
1 parent b591b6e commit 85d1431
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 25 deletions.
8 changes: 6 additions & 2 deletions sound/core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,13 @@
# Copyright (c) 1999,2001 by Jaroslav Kysela <[email protected]>
#

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
Expand Down
8 changes: 0 additions & 8 deletions sound/core/info.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@
#include <linux/mutex.h>
#include <stdarg.h>

/*
*
*/

#ifdef CONFIG_PROC_FS

int snd_info_check_reserved_words(const char *str)
{
static char *reserved[] =
Expand Down Expand Up @@ -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 */
4 changes: 0 additions & 4 deletions sound/core/info_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
#include <linux/utsname.h>
#include <linux/mutex.h>

#if defined(CONFIG_SND_OSSEMUL) && defined(CONFIG_PROC_FS)

/*
* OSS compatible part
*/
Expand Down Expand Up @@ -134,5 +132,3 @@ int snd_info_minor_unregister(void)
snd_sndstat_proc_entry = NULL;
return 0;
}

#endif /* CONFIG_SND_OSSEMUL */
3 changes: 2 additions & 1 deletion sound/core/seq/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions sound/core/seq/seq_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -80,4 +79,3 @@ int __exit snd_seq_info_done(void)
free_info_entries();
return 0;
}
#endif
8 changes: 0 additions & 8 deletions sound/core/sound_oss.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <linux/init.h>
#include <linux/export.h>
#include <linux/slab.h>
Expand Down Expand Up @@ -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 */

0 comments on commit 85d1431

Please sign in to comment.