aboutsummaryrefslogtreecommitdiff
path: root/sound/core/seq/oss
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/oss
parente28563cceb9f258ebe3c50fc27d8f4ff0ac4bfa4 (diff)
[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/oss')
-rw-r--r--sound/core/seq/oss/seq_oss.c14
-rw-r--r--sound/core/seq/oss/seq_oss_init.c3
-rw-r--r--sound/core/seq/oss/seq_oss_midi.c3
-rw-r--r--sound/core/seq/oss/seq_oss_readq.c2
-rw-r--r--sound/core/seq/oss/seq_oss_synth.c3
5 files changed, 14 insertions, 11 deletions
diff --git a/sound/core/seq/oss/seq_oss.c b/sound/core/seq/oss/seq_oss.c
index 4b51ab56507..c98f0ba1381 100644
--- a/sound/core/seq/oss/seq_oss.c
+++ b/sound/core/seq/oss/seq_oss.c
@@ -52,8 +52,13 @@ int seq_oss_debug = 0;
*/
static int register_device(void);
static void unregister_device(void);
+#ifdef CONFIG_PROC_FS
static int register_proc(void);
static void unregister_proc(void);
+#else
+static inline int register_proc(void) { return 0; }
+static inline void unregister_proc(void) {}
+#endif
static int odev_open(struct inode *inode, struct file *file);
static int odev_release(struct inode *inode, struct file *file);
@@ -61,9 +66,6 @@ static ssize_t odev_read(struct file *file, char __user *buf, size_t count, loff
static ssize_t odev_write(struct file *file, const char __user *buf, size_t count, loff_t *offset);
static long odev_ioctl(struct file *file, unsigned int cmd, unsigned long arg);
static unsigned int odev_poll(struct file *file, poll_table * wait);
-#ifdef CONFIG_PROC_FS
-static void info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf);
-#endif
/*
@@ -276,12 +278,10 @@ info_read(struct snd_info_entry *entry, struct snd_info_buffer *buf)
up(&register_mutex);
}
-#endif /* CONFIG_PROC_FS */
static int __init
register_proc(void)
{
-#ifdef CONFIG_PROC_FS
struct snd_info_entry *entry;
entry = snd_info_create_module_entry(THIS_MODULE, SNDRV_SEQ_OSS_PROCNAME, snd_seq_root);
@@ -297,16 +297,14 @@ register_proc(void)
return -ENOMEM;
}
info_entry = entry;
-#endif
return 0;
}
static void
unregister_proc(void)
{
-#ifdef CONFIG_PROC_FS
if (info_entry)
snd_info_unregister(info_entry);
info_entry = NULL;
-#endif
}
+#endif /* CONFIG_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index 1d4473eadcf..97e2493e931 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -502,6 +502,7 @@ snd_seq_oss_reset(struct seq_oss_devinfo *dp)
}
+#ifdef CONFIG_PROC_FS
/*
* misc. functions for proc interface
*/
@@ -552,4 +553,4 @@ snd_seq_oss_system_info_read(struct snd_info_buffer *buf)
snd_seq_oss_readq_info_read(dp->readq, buf);
}
}
-
+#endif /* CONFIG_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_midi.c b/sound/core/seq/oss/seq_oss_midi.c
index eb7ae990965..0a711d2d04f 100644
--- a/sound/core/seq/oss/seq_oss_midi.c
+++ b/sound/core/seq/oss/seq_oss_midi.c
@@ -668,6 +668,7 @@ snd_seq_oss_midi_make_info(struct seq_oss_devinfo *dp, int dev, struct midi_info
}
+#ifdef CONFIG_PROC_FS
/*
* proc interface
*/
@@ -707,4 +708,4 @@ snd_seq_oss_midi_info_read(struct snd_info_buffer *buf)
snd_use_lock_free(&mdev->use_lock);
}
}
-
+#endif /* CONFIG_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_readq.c b/sound/core/seq/oss/seq_oss_readq.c
index abc70078add..f5de79f29f1 100644
--- a/sound/core/seq/oss/seq_oss_readq.c
+++ b/sound/core/seq/oss/seq_oss_readq.c
@@ -222,6 +222,7 @@ snd_seq_oss_readq_put_timestamp(struct seq_oss_readq *q, unsigned long curt, int
}
+#ifdef CONFIG_PROC_FS
/*
* proc interface
*/
@@ -232,3 +233,4 @@ snd_seq_oss_readq_info_read(struct seq_oss_readq *q, struct snd_info_buffer *buf
(waitqueue_active(&q->midi_sleep) ? "sleeping":"running"),
q->qlen, q->input_time);
}
+#endif /* CONFIG_PROC_FS */
diff --git a/sound/core/seq/oss/seq_oss_synth.c b/sound/core/seq/oss/seq_oss_synth.c
index 0b6025c92b9..ab570a0a618 100644
--- a/sound/core/seq/oss/seq_oss_synth.c
+++ b/sound/core/seq/oss/seq_oss_synth.c
@@ -621,6 +621,7 @@ snd_seq_oss_synth_make_info(struct seq_oss_devinfo *dp, int dev, struct synth_in
}
+#ifdef CONFIG_PROC_FS
/*
* proc interface
*/
@@ -648,4 +649,4 @@ snd_seq_oss_synth_info_read(struct snd_info_buffer *buf)
snd_use_lock_free(&rec->use_lock);
}
}
-
+#endif /* CONFIG_PROC_FS */