aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorJaroslav Kysela <perex@suse.cz>2005-01-03 11:12:28 +0100
committerJaroslav Kysela <perex@suse.cz>2005-01-03 11:12:28 +0100
commitb55d292258434b8aba04c723e69b651bf79734c4 (patch)
tree289a3493b5c8a28b32070da70c105c28a0ba95e6 /sound
parent12cc11e99d2b7d4dc5f8f8edf882b2dbc0145874 (diff)
downloadhistory-b55d292258434b8aba04c723e69b651bf79734c4.tar.gz
[ALSA] ALSA core: misc cleanups
HWDEP Midlevel,ALSA Core,PCM Midlevel,RawMidi Midlevel ALSA<-OSS emulation,ALSA sequencer,ALSA<-OSS sequencer The patch below does the following cleanups under sound/core/ : - make needlessly global code static - remove the following stale prototypes from pcm.h (the functions are not or no longer present): - snd_pcm_capture_ready_jiffies - snd_pcm_playback_ready_jiffies - remove the following unused global functions: - oss/pcm_plugin.c: snd_pcm_plug_capture_channels_mask - seq/seq_instr.c: snd_seq_cluster_new - seq/seq_instr.c: snd_seq_cluster_free - move global to static inline functions - pcm_lib.c: snd_pcm_playback_ready - pcm_lib.c: snd_pcm_capture_ready - pcm_lib.c: snd_pcm_playback_empty - pcm_lib.c: snd_pcm_capture_empty - pcm_lib.c: snd_pcm_playback_data - remove the following unused EXPORT_SYMBOL's: - snd_create_proc_entry - snd_interval_ratden - snd_midi_channel_init - snd_midi_channel_init_set - snd_pcm_playback_empty - snd_pcm_capture_empty - snd_pcm_playback_data - snd_pcm_capture_poll - snd_pcm_playback_ready - snd_pcm_capture_ready - snd_pcm_format_size - snd_pcm_open - snd_pcm_playback_poll - snd_pcm_playback_ready - snd_pcm_release - snd_pcm_subformat_name - snd_remove_proc_entry Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound')
-rw-r--r--sound/core/hwdep.c2
-rw-r--r--sound/core/info.c8
-rw-r--r--sound/core/memory.c2
-rw-r--r--sound/core/oss/mixer_oss.c4
-rw-r--r--sound/core/oss/pcm_oss.c4
-rw-r--r--sound/core/oss/pcm_plugin.c31
-rw-r--r--sound/core/oss/route.c12
-rw-r--r--sound/core/pcm.c30
-rw-r--r--sound/core/pcm_lib.c98
-rw-r--r--sound/core/pcm_native.c16
-rw-r--r--sound/core/rawmidi.c8
-rw-r--r--sound/core/seq/oss/seq_oss_device.h1
-rw-r--r--sound/core/seq/oss/seq_oss_init.c39
-rw-r--r--sound/core/seq/seq_clientmgr.c4
-rw-r--r--sound/core/seq/seq_clientmgr.h1
-rw-r--r--sound/core/seq/seq_instr.c16
-rw-r--r--sound/core/seq/seq_memory.c2
-rw-r--r--sound/core/seq/seq_memory.h1
-rw-r--r--sound/core/seq/seq_midi.c8
-rw-r--r--sound/core/seq/seq_midi_emul.c10
-rw-r--r--sound/core/sound.c4
21 files changed, 87 insertions, 214 deletions
diff --git a/sound/core/hwdep.c b/sound/core/hwdep.c
index b79f23156df220..cbd8eba6a35aea 100644
--- a/sound/core/hwdep.c
+++ b/sound/core/hwdep.c
@@ -35,7 +35,7 @@ MODULE_AUTHOR("Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("Hardware dependent layer");
MODULE_LICENSE("GPL");
-snd_hwdep_t *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
+static snd_hwdep_t *snd_hwdep_devices[SNDRV_CARDS * SNDRV_MINOR_HWDEPS];
static DECLARE_MUTEX(register_mutex);
diff --git a/sound/core/info.c b/sound/core/info.c
index 5bf76bd0c9b75e..de9879b3b38676 100644
--- a/sound/core/info.c
+++ b/sound/core/info.c
@@ -125,8 +125,8 @@ static inline void snd_info_entry_prepare(struct proc_dir_entry *de)
de->owner = THIS_MODULE;
}
-void snd_remove_proc_entry(struct proc_dir_entry *parent,
- struct proc_dir_entry *de)
+static void snd_remove_proc_entry(struct proc_dir_entry *parent,
+ struct proc_dir_entry *de)
{
if (de)
remove_proc_entry(de->name, parent);
@@ -521,8 +521,8 @@ static struct file_operations snd_info_entry_operations =
*
* Returns the pointer of new instance or NULL on failure.
*/
-struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
- struct proc_dir_entry *parent)
+static struct proc_dir_entry *snd_create_proc_entry(const char *name, mode_t mode,
+ struct proc_dir_entry *parent)
{
struct proc_dir_entry *p;
p = create_proc_entry(name, mode, parent);
diff --git a/sound/core/memory.c b/sound/core/memory.c
index 5949405282d18c..8576c51528ef71 100644
--- a/sound/core/memory.c
+++ b/sound/core/memory.c
@@ -89,7 +89,7 @@ void snd_memory_done(void)
}
}
-void *__snd_kmalloc(size_t size, int flags, void *caller)
+static void *__snd_kmalloc(size_t size, int flags, void *caller)
{
unsigned long cpu_flags;
struct snd_alloc_track *t;
diff --git a/sound/core/oss/mixer_oss.c b/sound/core/oss/mixer_oss.c
index f2228ac8d814d6..b9901566a1d667 100644
--- a/sound/core/oss/mixer_oss.c
+++ b/sound/core/oss/mixer_oss.c
@@ -360,8 +360,8 @@ static int snd_mixer_oss_ioctl1(snd_mixer_oss_file_t *fmixer, unsigned int cmd,
}
/* FIXME: need to unlock BKL to allow preemption */
-int snd_mixer_oss_ioctl(struct inode *inode, struct file *file,
- unsigned int cmd, unsigned long arg)
+static int snd_mixer_oss_ioctl(struct inode *inode, struct file *file,
+ unsigned int cmd, unsigned long arg)
{
int err;
/* FIXME: need to unlock BKL to allow preemption */
diff --git a/sound/core/oss/pcm_oss.c b/sound/core/oss/pcm_oss.c
index 8a021b379c815f..cc76a98d4c2023 100644
--- a/sound/core/oss/pcm_oss.c
+++ b/sound/core/oss/pcm_oss.c
@@ -77,7 +77,7 @@ static inline void snd_leave_user(mm_segment_t fs)
set_fs(fs);
}
-int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
+static int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_plugin_t *plugin, *next;
@@ -92,7 +92,7 @@ int snd_pcm_oss_plugin_clear(snd_pcm_substream_t *substream)
return 0;
}
-int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
+static int snd_pcm_plugin_insert(snd_pcm_plugin_t *plugin)
{
snd_pcm_runtime_t *runtime = plugin->plug->runtime;
plugin->next = runtime->oss.plugin_first;
diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c
index 59de5af419704c..397d9b6d0d2297 100644
--- a/sound/core/oss/pcm_plugin.c
+++ b/sound/core/oss/pcm_plugin.c
@@ -651,8 +651,8 @@ snd_pcm_sframes_t snd_pcm_plug_client_channels_buf(snd_pcm_plug_t *plug,
return count;
}
-int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
- bitset_t *client_vmask)
+static int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
+ bitset_t *client_vmask)
{
snd_pcm_plugin_t *plugin = snd_pcm_plug_last(plug);
if (plugin == NULL) {
@@ -682,33 +682,6 @@ int snd_pcm_plug_playback_channels_mask(snd_pcm_plug_t *plug,
}
}
-int snd_pcm_plug_capture_channels_mask(snd_pcm_plug_t *plug,
- bitset_t *client_vmask)
-{
- snd_pcm_plugin_t *plugin = snd_pcm_plug_first(plug);
- if (plugin == NULL) {
- return 0;
- } else {
- int schannels = plugin->src_format.channels;
- bitset_t bs[bitset_size(schannels)];
- bitset_t *srcmask = bs;
- bitset_t *dstmask;
- int err;
- bitset_one(srcmask, schannels);
- while (1) {
- err = plugin->dst_channels_mask(plugin, srcmask, &dstmask);
- if (err < 0)
- return err;
- srcmask = dstmask;
- if (plugin->next == NULL)
- break;
- plugin = plugin->next;
- }
- bitset_and(client_vmask, srcmask, plugin->dst_format.channels);
- return 0;
- }
-}
-
static int snd_pcm_plug_playback_disable_useless_channels(snd_pcm_plug_t *plug,
snd_pcm_plugin_channel_t *src_channels)
{
diff --git a/sound/core/oss/route.c b/sound/core/oss/route.c
index 54ea37988ebb6c..6ff4de7cc4f39b 100644
--- a/sound/core/oss/route.c
+++ b/sound/core/oss/route.c
@@ -353,9 +353,9 @@ static void route_to_channel(snd_pcm_plugin_t *plugin,
}
}
-int route_src_channels_mask(snd_pcm_plugin_t *plugin,
- bitset_t *dst_vmask,
- bitset_t **src_vmask)
+static int route_src_channels_mask(snd_pcm_plugin_t *plugin,
+ bitset_t *dst_vmask,
+ bitset_t **src_vmask)
{
route_t *data = (route_t *)plugin->extra_data;
int schannels = plugin->src_format.channels;
@@ -377,9 +377,9 @@ int route_src_channels_mask(snd_pcm_plugin_t *plugin,
return 0;
}
-int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
- bitset_t *src_vmask,
- bitset_t **dst_vmask)
+static int route_dst_channels_mask(snd_pcm_plugin_t *plugin,
+ bitset_t *src_vmask,
+ bitset_t **dst_vmask)
{
route_t *data = (route_t *)plugin->extra_data;
int dchannels = plugin->dst_format.channels;
diff --git a/sound/core/pcm.c b/sound/core/pcm.c
index ef16efbb1538cb..559c66c55754c0 100644
--- a/sound/core/pcm.c
+++ b/sound/core/pcm.c
@@ -126,12 +126,12 @@ static int snd_pcm_control_ioctl(snd_card_t * card,
#define FORMAT(v) [SNDRV_PCM_FORMAT_##v] = #v
#define SUBFORMAT(v) [SNDRV_PCM_SUBFORMAT_##v] = #v
-char *snd_pcm_stream_names[] = {
+static char *snd_pcm_stream_names[] = {
STREAM(PLAYBACK),
STREAM(CAPTURE),
};
-char *snd_pcm_state_names[] = {
+static char *snd_pcm_state_names[] = {
STATE(OPEN),
STATE(SETUP),
STATE(PREPARED),
@@ -142,7 +142,7 @@ char *snd_pcm_state_names[] = {
STATE(SUSPENDED),
};
-char *snd_pcm_access_names[] = {
+static char *snd_pcm_access_names[] = {
ACCESS(MMAP_INTERLEAVED),
ACCESS(MMAP_NONINTERLEAVED),
ACCESS(MMAP_COMPLEX),
@@ -150,7 +150,7 @@ char *snd_pcm_access_names[] = {
ACCESS(RW_NONINTERLEAVED),
};
-char *snd_pcm_format_names[] = {
+static char *snd_pcm_format_names[] = {
FORMAT(S8),
FORMAT(U8),
FORMAT(S16_LE),
@@ -191,22 +191,22 @@ char *snd_pcm_format_names[] = {
FORMAT(U18_3BE),
};
-char *snd_pcm_subformat_names[] = {
+static char *snd_pcm_subformat_names[] = {
SUBFORMAT(STD),
};
-char *snd_pcm_tstamp_mode_names[] = {
+static char *snd_pcm_tstamp_mode_names[] = {
TSTAMP(NONE),
TSTAMP(MMAP),
};
-const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
+static const char *snd_pcm_stream_name(snd_pcm_stream_t stream)
{
snd_assert(stream <= SNDRV_PCM_STREAM_LAST, return NULL);
return snd_pcm_stream_names[stream];
}
-const char *snd_pcm_access_name(snd_pcm_access_t access)
+static const char *snd_pcm_access_name(snd_pcm_access_t access)
{
snd_assert(access <= SNDRV_PCM_ACCESS_LAST, return NULL);
return snd_pcm_access_names[access];
@@ -218,19 +218,19 @@ const char *snd_pcm_format_name(snd_pcm_format_t format)
return snd_pcm_format_names[format];
}
-const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
+static const char *snd_pcm_subformat_name(snd_pcm_subformat_t subformat)
{
snd_assert(subformat <= SNDRV_PCM_SUBFORMAT_LAST, return NULL);
return snd_pcm_subformat_names[subformat];
}
-const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
+static const char *snd_pcm_tstamp_mode_name(snd_pcm_tstamp_t mode)
{
snd_assert(mode <= SNDRV_PCM_TSTAMP_LAST, return NULL);
return snd_pcm_tstamp_mode_names[mode];
}
-const char *snd_pcm_state_name(snd_pcm_state_t state)
+static const char *snd_pcm_state_name(snd_pcm_state_t state)
{
snd_assert(state <= SNDRV_PCM_STATE_LAST, return NULL);
return snd_pcm_state_names[state];
@@ -238,7 +238,7 @@ const char *snd_pcm_state_name(snd_pcm_state_t state)
#if defined(CONFIG_SND_PCM_OSS) || defined(CONFIG_SND_PCM_OSS_MODULE)
#include <linux/soundcard.h>
-const char *snd_pcm_oss_format_name(int format)
+static const char *snd_pcm_oss_format_name(int format)
{
switch (format) {
case AFMT_MU_LAW:
@@ -1034,7 +1034,6 @@ EXPORT_SYMBOL(snd_pcm_notify);
EXPORT_SYMBOL(snd_pcm_open_substream);
EXPORT_SYMBOL(snd_pcm_release_substream);
EXPORT_SYMBOL(snd_pcm_format_name);
-EXPORT_SYMBOL(snd_pcm_subformat_name);
/* pcm_native.c */
EXPORT_SYMBOL(snd_pcm_link_rwlock);
EXPORT_SYMBOL(snd_pcm_start);
@@ -1045,10 +1044,6 @@ EXPORT_SYMBOL(snd_pcm_suspend_all);
EXPORT_SYMBOL(snd_pcm_kernel_playback_ioctl);
EXPORT_SYMBOL(snd_pcm_kernel_capture_ioctl);
EXPORT_SYMBOL(snd_pcm_kernel_ioctl);
-EXPORT_SYMBOL(snd_pcm_open);
-EXPORT_SYMBOL(snd_pcm_release);
-EXPORT_SYMBOL(snd_pcm_playback_poll);
-EXPORT_SYMBOL(snd_pcm_capture_poll);
EXPORT_SYMBOL(snd_pcm_mmap_data);
#if SNDRV_PCM_INFO_MMAP_IOMEM
EXPORT_SYMBOL(snd_pcm_lib_mmap_iomem);
@@ -1061,7 +1056,6 @@ EXPORT_SYMBOL(snd_pcm_format_little_endian);
EXPORT_SYMBOL(snd_pcm_format_big_endian);
EXPORT_SYMBOL(snd_pcm_format_width);
EXPORT_SYMBOL(snd_pcm_format_physical_width);
-EXPORT_SYMBOL(snd_pcm_format_size);
EXPORT_SYMBOL(snd_pcm_format_silence_64);
EXPORT_SYMBOL(snd_pcm_format_set_silence);
EXPORT_SYMBOL(snd_pcm_build_linear_format);
diff --git a/sound/core/pcm_lib.c b/sound/core/pcm_lib.c
index 4d0b0f719721a2..fc05089ca34848 100644
--- a/sound/core/pcm_lib.c
+++ b/sound/core/pcm_lib.c
@@ -371,7 +371,7 @@ static inline unsigned int muldiv32(unsigned int a, unsigned int b,
return n;
}
-int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
+static int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
{
int changed = 0;
assert(!snd_interval_empty(i));
@@ -396,7 +396,7 @@ int snd_interval_refine_min(snd_interval_t *i, unsigned int min, int openmin)
return changed;
}
-int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int openmax)
+static int snd_interval_refine_max(snd_interval_t *i, unsigned int max, int openmax)
{
int changed = 0;
assert(!snd_interval_empty(i));
@@ -474,7 +474,7 @@ int snd_interval_refine(snd_interval_t *i, const snd_interval_t *v)
return changed;
}
-int snd_interval_refine_first(snd_interval_t *i)
+static int snd_interval_refine_first(snd_interval_t *i)
{
assert(!snd_interval_empty(i));
if (snd_interval_single(i))
@@ -486,7 +486,7 @@ int snd_interval_refine_first(snd_interval_t *i)
return 1;
}
-int snd_interval_refine_last(snd_interval_t *i)
+static int snd_interval_refine_last(snd_interval_t *i)
{
assert(!snd_interval_empty(i));
if (snd_interval_single(i))
@@ -498,7 +498,7 @@ int snd_interval_refine_last(snd_interval_t *i)
return 1;
}
-int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
+static int snd_interval_refine_set(snd_interval_t *i, unsigned int val)
{
snd_interval_t t;
t.empty = 0;
@@ -718,9 +718,9 @@ int snd_interval_ratnum(snd_interval_t *i,
*
* Returns non-zero if the value is changed, zero if not changed.
*/
-int snd_interval_ratden(snd_interval_t *i,
- unsigned int rats_count, ratden_t *rats,
- unsigned int *nump, unsigned int *denp)
+static int snd_interval_ratden(snd_interval_t *i,
+ unsigned int rats_count, ratden_t *rats,
+ unsigned int *nump, unsigned int *denp)
{
unsigned int best_num, best_diff, best_den;
unsigned int k;
@@ -858,7 +858,7 @@ int snd_interval_list(snd_interval_t *i, unsigned int count, unsigned int *list,
return changed;
}
-int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step)
+static int snd_interval_step(snd_interval_t *i, unsigned int min, unsigned int step)
{
unsigned int n;
int changed = 0;
@@ -1856,80 +1856,6 @@ int snd_pcm_lib_ioctl(snd_pcm_substream_t *substream,
* Conditions
*/
-/**
- * snd_pcm_playback_ready - check whether the playback buffer is available
- * @substream: the pcm substream instance
- *
- * Checks whether enough free space is available on the playback buffer.
- *
- * Returns non-zero if available, or zero if not.
- */
-int snd_pcm_playback_ready(snd_pcm_substream_t *substream)
-{
- snd_pcm_runtime_t *runtime = substream->runtime;
- return snd_pcm_playback_avail(runtime) >= runtime->control->avail_min;
-}
-
-/**
- * snd_pcm_capture_ready - check whether the capture buffer is available
- * @substream: the pcm substream instance
- *
- * Checks whether enough capture data is available on the capture buffer.
- *
- * Returns non-zero if available, or zero if not.
- */
-int snd_pcm_capture_ready(snd_pcm_substream_t *substream)
-{
- snd_pcm_runtime_t *runtime = substream->runtime;
- return snd_pcm_capture_avail(runtime) >= runtime->control->avail_min;
-}
-
-/**
- * snd_pcm_playback_data - check whether any data exists on the playback buffer
- * @substream: the pcm substream instance
- *
- * Checks whether any data exists on the playback buffer. If stop_threshold
- * is bigger or equal to boundary, then this function returns always non-zero.
- *
- * Returns non-zero if exists, or zero if not.
- */
-int snd_pcm_playback_data(snd_pcm_substream_t *substream)
-{
- snd_pcm_runtime_t *runtime = substream->runtime;
-
- if (runtime->stop_threshold >= runtime->boundary)
- return 1;
- return snd_pcm_playback_avail(runtime) < runtime->buffer_size;
-}
-
-/**
- * snd_pcm_playback_empty - check whether the playback buffer is empty
- * @substream: the pcm substream instance
- *
- * Checks whether the playback buffer is empty.
- *
- * Returns non-zero if empty, or zero if not.
- */
-int snd_pcm_playback_empty(snd_pcm_substream_t *substream)
-{
- snd_pcm_runtime_t *runtime = substream->runtime;
- return snd_pcm_playback_avail(runtime) >= runtime->buffer_size;
-}
-
-/**
- * snd_pcm_capture_empty - check whether the capture buffer is empty
- * @substream: the pcm substream instance
- *
- * Checks whether the capture buffer is empty.
- *
- * Returns non-zero if empty, or zero if not.
- */
-int snd_pcm_capture_empty(snd_pcm_substream_t *substream)
-{
- snd_pcm_runtime_t *runtime = substream->runtime;
- return snd_pcm_capture_avail(runtime) == 0;
-}
-
static void snd_pcm_system_tick_set(snd_pcm_substream_t *substream,
unsigned long ticks)
{
@@ -2643,7 +2569,6 @@ snd_pcm_sframes_t snd_pcm_lib_readv(snd_pcm_substream_t *substream,
EXPORT_SYMBOL(snd_interval_refine);
EXPORT_SYMBOL(snd_interval_list);
EXPORT_SYMBOL(snd_interval_ratnum);
-EXPORT_SYMBOL(snd_interval_ratden);
EXPORT_SYMBOL(snd_interval_muldivk);
EXPORT_SYMBOL(snd_interval_mulkdiv);
EXPORT_SYMBOL(snd_interval_div);
@@ -2675,10 +2600,6 @@ EXPORT_SYMBOL(snd_pcm_hw_rule_add);
EXPORT_SYMBOL(snd_pcm_set_ops);
EXPORT_SYMBOL(snd_pcm_set_sync);
EXPORT_SYMBOL(snd_pcm_lib_ioctl);
-EXPORT_SYMBOL(snd_pcm_playback_ready);
-EXPORT_SYMBOL(snd_pcm_capture_ready);
-EXPORT_SYMBOL(snd_pcm_playback_data);
-EXPORT_SYMBOL(snd_pcm_capture_empty);
EXPORT_SYMBOL(snd_pcm_stop);
EXPORT_SYMBOL(snd_pcm_period_elapsed);
EXPORT_SYMBOL(snd_pcm_lib_write);
@@ -2688,7 +2609,6 @@ EXPORT_SYMBOL(snd_pcm_lib_readv);
EXPORT_SYMBOL(snd_pcm_lib_buffer_bytes);
EXPORT_SYMBOL(snd_pcm_lib_period_bytes);
/* pcm_memory.c */
-EXPORT_SYMBOL(snd_pcm_lib_preallocate_free);
EXPORT_SYMBOL(snd_pcm_lib_preallocate_free_for_all);
EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages);
EXPORT_SYMBOL(snd_pcm_lib_preallocate_pages_for_all);
diff --git a/sound/core/pcm_native.c b/sound/core/pcm_native.c
index b6e2bc7cf536b0..d0519469c52a13 100644
--- a/sound/core/pcm_native.c
+++ b/sound/core/pcm_native.c
@@ -2020,7 +2020,7 @@ static int snd_pcm_open_file(struct file *file,
return 0;
}
-int snd_pcm_open(struct inode *inode, struct file *file)
+static int snd_pcm_open(struct inode *inode, struct file *file)
{
int cardnum = SNDRV_MINOR_CARD(iminor(inode));
int device = SNDRV_MINOR_DEVICE(iminor(inode));
@@ -2079,7 +2079,7 @@ int snd_pcm_open(struct inode *inode, struct file *file)
return err;
}
-int snd_pcm_release(struct inode *inode, struct file *file)
+static int snd_pcm_release(struct inode *inode, struct file *file)
{
snd_pcm_t *pcm;
snd_pcm_substream_t *substream;
@@ -2101,7 +2101,7 @@ int snd_pcm_release(struct inode *inode, struct file *file)
return 0;
}
-snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_sframes_t appl_ptr;
@@ -2150,7 +2150,7 @@ snd_pcm_sframes_t snd_pcm_playback_rewind(snd_pcm_substream_t *substream, snd_pc
return ret;
}
-snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_sframes_t appl_ptr;
@@ -2199,7 +2199,7 @@ snd_pcm_sframes_t snd_pcm_capture_rewind(snd_pcm_substream_t *substream, snd_pcm
return ret;
}
-snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_sframes_t appl_ptr;
@@ -2249,7 +2249,7 @@ snd_pcm_sframes_t snd_pcm_playback_forward(snd_pcm_substream_t *substream, snd_p
return ret;
}
-snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
+static snd_pcm_sframes_t snd_pcm_capture_forward(snd_pcm_substream_t *substream, snd_pcm_uframes_t frames)
{
snd_pcm_runtime_t *runtime = substream->runtime;
snd_pcm_sframes_t appl_ptr;
@@ -2835,7 +2835,7 @@ static ssize_t snd_pcm_writev(struct file *file, const struct iovec *_vector,
return result;
}
-unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
+static unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
{
snd_pcm_file_t *pcm_file;
snd_pcm_substream_t *substream;
@@ -2873,7 +2873,7 @@ unsigned int snd_pcm_playback_poll(struct file *file, poll_table * wait)
return mask;
}
-unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
+static unsigned int snd_pcm_capture_poll(struct file *file, poll_table * wait)
{
snd_pcm_file_t *pcm_file;
snd_pcm_substream_t *substream;
diff --git a/sound/core/rawmidi.c b/sound/core/rawmidi.c
index 6c7609329bc0bf..d3675111607f63 100644
--- a/sound/core/rawmidi.c
+++ b/sound/core/rawmidi.c
@@ -54,7 +54,7 @@ static int snd_rawmidi_dev_register(snd_device_t *device);
static int snd_rawmidi_dev_disconnect(snd_device_t *device);
static int snd_rawmidi_dev_unregister(snd_device_t *device);
-snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
+static snd_rawmidi_t *snd_rawmidi_devices[SNDRV_CARDS * SNDRV_RAWMIDI_DEVICES];
static DECLARE_MUTEX(register_mutex);
@@ -795,8 +795,10 @@ static int snd_rawmidi_ioctl(struct inode *inode, struct file *file,
return err;
}
-int snd_rawmidi_control_ioctl(snd_card_t * card, snd_ctl_file_t * control,
- unsigned int cmd, unsigned long arg)
+static int snd_rawmidi_control_ioctl(snd_card_t * card,
+ snd_ctl_file_t * control,
+ unsigned int cmd,
+ unsigned long arg)
{
void __user *argp = (void __user *)arg;
unsigned int tmp;
diff --git a/sound/core/seq/oss/seq_oss_device.h b/sound/core/seq/oss/seq_oss_device.h
index d0f037a6210b98..da23c4db8dd5f9 100644
--- a/sound/core/seq/oss/seq_oss_device.h
+++ b/sound/core/seq/oss/seq_oss_device.h
@@ -185,7 +185,6 @@ snd_seq_oss_fill_addr(seq_oss_devinfo_t *dp, snd_seq_event_t *ev,
/* misc. functions for proc interface */
char *enabled_str(int bool);
-char *filemode_str(int fmode);
/* for debug */
diff --git a/sound/core/seq/oss/seq_oss_init.c b/sound/core/seq/oss/seq_oss_init.c
index cecf3f8252ba64..9f245c99941879 100644
--- a/sound/core/seq/oss/seq_oss_init.c
+++ b/sound/core/seq/oss/seq_oss_init.c
@@ -491,6 +491,26 @@ snd_seq_oss_reset(seq_oss_devinfo_t *dp)
snd_seq_oss_timer_stop(dp->timer);
}
+
+/*
+ * misc. functions for proc interface
+ */
+char *
+enabled_str(int bool)
+{
+ return bool ? "enabled" : "disabled";
+}
+
+static char *
+filemode_str(int val)
+{
+ static char *str[] = {
+ "none", "read", "write", "read/write",
+ };
+ return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
+}
+
+
/*
* proc interface
*/
@@ -523,22 +543,3 @@ snd_seq_oss_system_info_read(snd_info_buffer_t *buf)
}
}
-/*
- * misc. functions for proc interface
- */
-char *
-enabled_str(int bool)
-{
- return bool ? "enabled" : "disabled";
-}
-
-char *
-filemode_str(int val)
-{
- static char *str[] = {
- "none", "read", "write", "read/write",
- };
- return str[val & SNDRV_SEQ_OSS_FILE_ACMODE];
-}
-
-
diff --git a/sound/core/seq/seq_clientmgr.c b/sound/core/seq/seq_clientmgr.c
index e32aa926f4ffcd..4b24a1fbc9897a 100644
--- a/sound/core/seq/seq_clientmgr.c
+++ b/sound/core/seq/seq_clientmgr.c
@@ -751,8 +751,8 @@ static int multicast_event(client_t *client, snd_seq_event_t *event,
* n == 0 : the event was not passed to any client.
* n < 0 : error - event was not processed.
*/
-int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
- int atomic, int hop)
+static int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event,
+ int atomic, int hop)
{
int result;
diff --git a/sound/core/seq/seq_clientmgr.h b/sound/core/seq/seq_clientmgr.h
index 7e14496d2d5fef..3715c36183d3f5 100644
--- a/sound/core/seq/seq_clientmgr.h
+++ b/sound/core/seq/seq_clientmgr.h
@@ -100,6 +100,5 @@ extern int snd_seq_kernel_client_enqueue(int client, snd_seq_event_t *ev, int at
int snd_seq_kernel_client_enqueue_blocking(int client, snd_seq_event_t * ev, struct file *file, int atomic, int hop);
int snd_seq_kernel_client_write_poll(int clientid, struct file *file, poll_table *wait);
int snd_seq_client_notify_subscription(int client, int port, snd_seq_port_subscribe_t *info, int evtype);
-int snd_seq_deliver_event(client_t *client, snd_seq_event_t *event, int atomic, int hop);
#endif
diff --git a/sound/core/seq/seq_instr.c b/sound/core/seq/seq_instr.c
index 5d11fc5b5cd575..315196768f9ccb 100644
--- a/sound/core/seq/seq_instr.c
+++ b/sound/core/seq/seq_instr.c
@@ -49,17 +49,7 @@ static void snd_instr_unlock_ops(snd_seq_kinstr_list_t *list)
}
}
-snd_seq_kcluster_t *snd_seq_cluster_new(int atomic)
-{
- return kcalloc(1, sizeof(snd_seq_kcluster_t), atomic ? GFP_ATOMIC : GFP_KERNEL);
-}
-
-void snd_seq_cluster_free(snd_seq_kcluster_t *cluster, int atomic)
-{
- kfree(cluster);
-}
-
-snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
+static snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
{
snd_seq_kinstr_t *instr;
@@ -70,7 +60,7 @@ snd_seq_kinstr_t *snd_seq_instr_new(int add_len, int atomic)
return instr;
}
-int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
+static int snd_seq_instr_free(snd_seq_kinstr_t *instr, int atomic)
{
int result = 0;
@@ -130,7 +120,7 @@ void snd_seq_instr_list_free(snd_seq_kinstr_list_t **list_ptr)
while ((cluster = list->chash[idx]) != NULL) {
list->chash[idx] = cluster->next;
list->ccount--;
- snd_seq_cluster_free(cluster, 0);
+ kfree(cluster);
}
}
kfree(list);
diff --git a/sound/core/seq/seq_memory.c b/sound/core/seq/seq_memory.c
index a2d463ea5fc401..b668fbca45a945 100644
--- a/sound/core/seq/seq_memory.c
+++ b/sound/core/seq/seq_memory.c
@@ -215,7 +215,7 @@ void snd_seq_cell_free(snd_seq_event_cell_t * cell)
/*
* allocate an event cell.
*/
-int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
+static int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file)
{
snd_seq_event_cell_t *cell;
unsigned long flags;
diff --git a/sound/core/seq/seq_memory.h b/sound/core/seq/seq_memory.h
index d2c9d8994d9a88..6c4dde5d3d6fec 100644
--- a/sound/core/seq/seq_memory.h
+++ b/sound/core/seq/seq_memory.h
@@ -64,7 +64,6 @@ struct pool {
};
extern void snd_seq_cell_free(snd_seq_event_cell_t* cell);
-int snd_seq_cell_alloc(pool_t *pool, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
int snd_seq_event_dup(pool_t *pool, snd_seq_event_t *event, snd_seq_event_cell_t **cellp, int nonblock, struct file *file);
diff --git a/sound/core/seq/seq_midi.c b/sound/core/seq/seq_midi.c
index f61d8bfe3c22fd..a9957aeadc284d 100644
--- a/sound/core/seq/seq_midi.c
+++ b/sound/core/seq/seq_midi.c
@@ -43,10 +43,10 @@ Possible options for midisynth module:
MODULE_AUTHOR("Frank van de Pol <fvdpol@coil.demon.nl>, Jaroslav Kysela <perex@suse.cz>");
MODULE_DESCRIPTION("Advanced Linux Sound Architecture sequencer MIDI synth.");
MODULE_LICENSE("GPL");
-int output_buffer_size = PAGE_SIZE;
+static int output_buffer_size = PAGE_SIZE;
module_param(output_buffer_size, int, 0644);
MODULE_PARM_DESC(output_buffer_size, "Output buffer size in bytes.");
-int input_buffer_size = PAGE_SIZE;
+static int input_buffer_size = PAGE_SIZE;
module_param(input_buffer_size, int, 0644);
MODULE_PARM_DESC(input_buffer_size, "Input buffer size in bytes.");
@@ -284,7 +284,7 @@ static int set_client_name(seq_midisynth_client_t *client, snd_card_t *card,
}
/* register new midi synth port */
-int
+static int
snd_seq_midisynth_register_port(snd_seq_device_t *dev)
{
seq_midisynth_client_t *client;
@@ -423,7 +423,7 @@ snd_seq_midisynth_register_port(snd_seq_device_t *dev)
}
/* release midi synth port */
-int
+static int
snd_seq_midisynth_unregister_port(snd_seq_device_t *dev)
{
seq_midisynth_client_t *client;
diff --git a/sound/core/seq/seq_midi_emul.c b/sound/core/seq/seq_midi_emul.c
index 5cb5605affc99a..5b2e2ed977b7b7 100644
--- a/sound/core/seq/seq_midi_emul.c
+++ b/sound/core/seq/seq_midi_emul.c
@@ -53,7 +53,7 @@ static void nrpn(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan, snd_mi
static void sysex(snd_midi_op_t *ops, void *private, unsigned char *sysex, int len, snd_midi_channel_set_t *chset);
static void all_sounds_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
static void all_notes_off(snd_midi_op_t *ops, void *private, snd_midi_channel_t *chan);
-void snd_midi_reset_controllers(snd_midi_channel_t *chan);
+static void snd_midi_reset_controllers(snd_midi_channel_t *chan);
static void reset_all_channels(snd_midi_channel_set_t *chset);
@@ -621,7 +621,7 @@ all_notes_off(snd_midi_op_t *ops, void *drv, snd_midi_channel_t *chan)
/*
* Initialise a single midi channel control block.
*/
-void snd_midi_channel_init(snd_midi_channel_t *p, int n)
+static void snd_midi_channel_init(snd_midi_channel_t *p, int n)
{
if (p == NULL)
return;
@@ -642,7 +642,7 @@ void snd_midi_channel_init(snd_midi_channel_t *p, int n)
/*
* Allocate and initialise a set of midi channel control blocks.
*/
-snd_midi_channel_t *snd_midi_channel_init_set(int n)
+static snd_midi_channel_t *snd_midi_channel_init_set(int n)
{
snd_midi_channel_t *chan;
int i;
@@ -697,7 +697,7 @@ snd_midi_channel_set_t *snd_midi_channel_alloc_set(int n)
/*
* Reset the midi controllers on a particular channel to default values.
*/
-void snd_midi_reset_controllers(snd_midi_channel_t *chan)
+static void snd_midi_reset_controllers(snd_midi_channel_t *chan)
{
memset(chan->control, 0, sizeof(chan->control));
chan->gm_volume = 127;
@@ -731,7 +731,5 @@ module_exit(alsa_seq_midi_emul_exit)
EXPORT_SYMBOL(snd_midi_process_event);
EXPORT_SYMBOL(snd_midi_channel_set_clear);
-EXPORT_SYMBOL(snd_midi_channel_init);
-EXPORT_SYMBOL(snd_midi_channel_init_set);
EXPORT_SYMBOL(snd_midi_channel_alloc_set);
EXPORT_SYMBOL(snd_midi_channel_free_set);
diff --git a/sound/core/sound.c b/sound/core/sound.c
index bf94a8d4a8b0b6..0ccf8fe259357d 100644
--- a/sound/core/sound.c
+++ b/sound/core/sound.c
@@ -159,7 +159,7 @@ static int snd_open(struct inode *inode, struct file *file)
return err;
}
-struct file_operations snd_fops =
+static struct file_operations snd_fops =
{
.owner = THIS_MODULE,
.open = snd_open
@@ -446,8 +446,6 @@ EXPORT_SYMBOL(snd_dma_pointer);
/* info.c */
#ifdef CONFIG_PROC_FS
EXPORT_SYMBOL(snd_seq_root);
-EXPORT_SYMBOL(snd_create_proc_entry);
-EXPORT_SYMBOL(snd_remove_proc_entry);
EXPORT_SYMBOL(snd_iprintf);
EXPORT_SYMBOL(snd_info_get_line);
EXPORT_SYMBOL(snd_info_get_str);