summaryrefslogtreecommitdiffstats
path: root/sound/core/seq/seq_device.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2005-12-01 10:43:51 +0100
committerJaroslav Kysela <perex@suse.cz>2006-01-03 12:30:05 +0100
commit04f141a8800d022981f0405a8d307c98aba55105 (patch)
tree2083ebe4a2959d57db1c016f1b8fa396e5c3f2af /sound/core/seq/seq_device.c
parente28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 (diff)
downloadlinux-04f141a8800d022981f0405a8d307c98aba55105.tar.bz2
[ALSA] Optimize for config without PROC_FS (seq and oss parts)
Modules: ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer Optimize the code when compiled without CONFIG_PROC_FS (in seq and oss emulation parts). Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core/seq/seq_device.c')
-rw-r--r--sound/core/seq/seq_device.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/sound/core/seq/seq_device.c b/sound/core/seq/seq_device.c
index 3f935a18b5e7..9ece443fba55 100644
--- a/sound/core/seq/seq_device.c
+++ b/sound/core/seq/seq_device.c
@@ -78,7 +78,9 @@ struct ops_list {
static LIST_HEAD(opslist);
static int num_ops;
static DECLARE_MUTEX(ops_mutex);
+#ifdef CONFIG_PROC_FS
static struct snd_info_entry *info_entry = NULL;
+#endif
/*
* prototypes
@@ -100,6 +102,7 @@ static void remove_drivers(void);
* show all drivers and their status
*/
+#ifdef CONFIG_PROC_FS
static void snd_seq_device_info(struct snd_info_entry *entry,
struct snd_info_buffer *buffer)
{
@@ -117,6 +120,7 @@ static void snd_seq_device_info(struct snd_info_entry *entry,
}
up(&ops_mutex);
}
+#endif
/*
* load all registered drivers (called from seq_clientmgr.c)
@@ -544,6 +548,7 @@ static void unlock_driver(struct ops_list *ops)
static int __init alsa_seq_device_init(void)
{
+#ifdef CONFIG_PROC_FS
info_entry = snd_info_create_module_entry(THIS_MODULE, "drivers",
snd_seq_root);
if (info_entry == NULL)
@@ -555,13 +560,16 @@ static int __init alsa_seq_device_init(void)
snd_info_free_entry(info_entry);
return -ENOMEM;
}
+#endif
return 0;
}
static void __exit alsa_seq_device_exit(void)
{
remove_drivers();
+#ifdef CONFIG_PROC_FS
snd_info_unregister(info_entry);
+#endif
if (num_ops)
snd_printk(KERN_ERR "drivers not released (%d)\n", num_ops);
}