Skip to content

Commit

Permalink
[PATCH] kill sound/oss/*_syms.c
Browse files Browse the repository at this point in the history
Move all EXPORT_SYMBOL's from sound/oss/*_syms.c to the files with the
actual functions.

Signed-off-by: Adrian Bunk <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
AdrianBunk authored and Linus Torvalds committed Oct 4, 2006
1 parent d56b9b9 commit ece7f77
Show file tree
Hide file tree
Showing 14 changed files with 93 additions and 168 deletions.
8 changes: 4 additions & 4 deletions sound/oss/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ obj-$(CONFIG_DMASOUND) += dmasound/
# Declare multi-part drivers.

sound-objs := \
dev_table.o soundcard.o sound_syms.o \
audio.o audio_syms.o dmabuf.o \
midi_syms.o midi_synth.o midibuf.o \
sequencer.o sequencer_syms.o sound_timer.o sys_timer.o
dev_table.o soundcard.o \
audio.o dmabuf.o \
midi_synth.o midibuf.o \
sequencer.o sound_timer.o sys_timer.o

pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o
sb-objs := sb_card.o
Expand Down
14 changes: 0 additions & 14 deletions sound/oss/audio_syms.c

This file was deleted.

44 changes: 43 additions & 1 deletion sound/oss/dev_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,39 @@

#include <linux/init.h>

#define _DEV_TABLE_C_
#include "sound_config.h"

struct audio_operations *audio_devs[MAX_AUDIO_DEV];
EXPORT_SYMBOL(audio_devs);

int num_audiodevs;
EXPORT_SYMBOL(num_audiodevs);

struct mixer_operations *mixer_devs[MAX_MIXER_DEV];
EXPORT_SYMBOL(mixer_devs);

int num_mixers;
EXPORT_SYMBOL(num_mixers);

struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV];
EXPORT_SYMBOL(synth_devs);

int num_synths;

struct midi_operations *midi_devs[MAX_MIDI_DEV];
EXPORT_SYMBOL(midi_devs);

int num_midis;
EXPORT_SYMBOL(num_midis);

struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = {
&default_sound_timer, NULL
};
EXPORT_SYMBOL(sound_timer_devs);

int num_sound_timers = 1;


static int sound_alloc_audiodev(void);

int sound_install_audiodrv(int vers, char *name, struct audio_driver *driver,
Expand Down Expand Up @@ -75,6 +105,7 @@ int sound_install_audiodrv(int vers, char *name, struct audio_driver *driver,
audio_init_devices();
return num;
}
EXPORT_SYMBOL(sound_install_audiodrv);

int sound_install_mixer(int vers, char *name, struct mixer_operations *driver,
int driver_size, void *devc)
Expand Down Expand Up @@ -113,6 +144,7 @@ int sound_install_mixer(int vers, char *name, struct mixer_operations *driver,
mixer_devs[n] = op;
return n;
}
EXPORT_SYMBOL(sound_install_mixer);

void sound_unload_audiodev(int dev)
{
Expand All @@ -122,6 +154,7 @@ void sound_unload_audiodev(int dev)
unregister_sound_dsp((dev<<4)+3);
}
}
EXPORT_SYMBOL(sound_unload_audiodev);

static int sound_alloc_audiodev(void)
{
Expand All @@ -144,6 +177,7 @@ int sound_alloc_mididev(void)
num_midis = i + 1;
return i;
}
EXPORT_SYMBOL(sound_alloc_mididev);

int sound_alloc_synthdev(void)
{
Expand All @@ -158,6 +192,7 @@ int sound_alloc_synthdev(void)
}
return -1;
}
EXPORT_SYMBOL(sound_alloc_synthdev);

int sound_alloc_mixerdev(void)
{
Expand All @@ -169,6 +204,7 @@ int sound_alloc_mixerdev(void)
num_mixers = i + 1;
return i;
}
EXPORT_SYMBOL(sound_alloc_mixerdev);

int sound_alloc_timerdev(void)
{
Expand All @@ -183,6 +219,7 @@ int sound_alloc_timerdev(void)
}
return -1;
}
EXPORT_SYMBOL(sound_alloc_timerdev);

void sound_unload_mixerdev(int dev)
{
Expand All @@ -192,6 +229,7 @@ void sound_unload_mixerdev(int dev)
num_mixers--;
}
}
EXPORT_SYMBOL(sound_unload_mixerdev);

void sound_unload_mididev(int dev)
{
Expand All @@ -200,15 +238,19 @@ void sound_unload_mididev(int dev)
unregister_sound_midi((dev<<4)+2);
}
}
EXPORT_SYMBOL(sound_unload_mididev);

void sound_unload_synthdev(int dev)
{
if (dev != -1)
synth_devs[dev] = NULL;
}
EXPORT_SYMBOL(sound_unload_synthdev);

void sound_unload_timerdev(int dev)
{
if (dev != -1)
sound_timer_devs[dev] = NULL;
}
EXPORT_SYMBOL(sound_unload_timerdev);

17 changes: 1 addition & 16 deletions sound/oss/dev_table.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,22 +352,8 @@ struct sound_timer_operations
void (*arm_timer)(int dev, long time);
};

#ifdef _DEV_TABLE_C_
struct audio_operations *audio_devs[MAX_AUDIO_DEV];
int num_audiodevs;
struct mixer_operations *mixer_devs[MAX_MIXER_DEV];
int num_mixers;
struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV];
int num_synths;
struct midi_operations *midi_devs[MAX_MIDI_DEV];
int num_midis;

extern struct sound_timer_operations default_sound_timer;
struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = {
&default_sound_timer, NULL
};
int num_sound_timers = 1;
#else

extern struct audio_operations *audio_devs[MAX_AUDIO_DEV];
extern int num_audiodevs;
extern struct mixer_operations *mixer_devs[MAX_MIXER_DEV];
Expand All @@ -378,7 +364,6 @@ extern struct midi_operations *midi_devs[MAX_MIDI_DEV];
extern int num_midis;
extern struct sound_timer_operations * sound_timer_devs[MAX_TIMER_DEV];
extern int num_sound_timers;
#endif /* _DEV_TABLE_C_ */

extern int sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info);
void sound_timer_init (struct sound_lowlev_timer *t, char *name);
Expand Down
10 changes: 4 additions & 6 deletions sound/oss/dmabuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -926,6 +926,7 @@ int DMAbuf_start_dma(int dev, unsigned long physaddr, int count, int dma_mode)
sound_start_dma(dmap, physaddr, count, dma_mode);
return count;
}
EXPORT_SYMBOL(DMAbuf_start_dma);

static int local_start_dma(struct audio_operations *adev, unsigned long physaddr, int count, int dma_mode)
{
Expand Down Expand Up @@ -1055,6 +1056,8 @@ void DMAbuf_outputintr(int dev, int notify_only)
do_outputintr(dev, notify_only);
spin_unlock_irqrestore(&dmap->lock,flags);
}
EXPORT_SYMBOL(DMAbuf_outputintr);

/* called with dmap->lock held in irq context */
static void do_inputintr(int dev)
{
Expand Down Expand Up @@ -1154,6 +1157,7 @@ void DMAbuf_inputintr(int dev)
do_inputintr(dev);
spin_unlock_irqrestore(&dmap->lock,flags);
}
EXPORT_SYMBOL(DMAbuf_inputintr);

void DMAbuf_init(int dev, int dma1, int dma2)
{
Expand All @@ -1162,12 +1166,6 @@ void DMAbuf_init(int dev, int dma1, int dma2)
* NOTE! This routine could be called several times.
*/

/* drag in audio_syms.o */
{
extern char audio_syms_symbol;
audio_syms_symbol = 0;
}

if (adev && adev->dmap_out == NULL) {
if (adev->d == NULL)
panic("OSS: audio_devs[%d]->d == NULL\n", dev);
Expand Down
29 changes: 0 additions & 29 deletions sound/oss/midi_syms.c

This file was deleted.

21 changes: 19 additions & 2 deletions sound/oss/midi_synth.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ do_midi_msg(int synthno, unsigned char *msg, int mlen)
;
}
}
EXPORT_SYMBOL(do_midi_msg);

static void
midi_outc(int midi_dev, int data)
Expand Down Expand Up @@ -276,6 +277,7 @@ int midi_synth_ioctl(int dev, unsigned int cmd, void __user *arg)
return -EINVAL;
}
}
EXPORT_SYMBOL(midi_synth_ioctl);

int
midi_synth_kill_note(int dev, int channel, int note, int velocity)
Expand Down Expand Up @@ -342,6 +344,7 @@ midi_synth_kill_note(int dev, int channel, int note, int velocity)

return 0;
}
EXPORT_SYMBOL(midi_synth_kill_note);

int
midi_synth_set_instr(int dev, int channel, int instr_no)
Expand All @@ -364,6 +367,7 @@ midi_synth_set_instr(int dev, int channel, int instr_no)

return 0;
}
EXPORT_SYMBOL(midi_synth_set_instr);

int
midi_synth_start_note(int dev, int channel, int note, int velocity)
Expand Down Expand Up @@ -405,13 +409,15 @@ midi_synth_start_note(int dev, int channel, int note, int velocity)
}
return 0;
}
EXPORT_SYMBOL(midi_synth_start_note);

void
midi_synth_reset(int dev)
{

leave_sysex(dev);
}
EXPORT_SYMBOL(midi_synth_reset);

int
midi_synth_open(int dev, int mode)
Expand Down Expand Up @@ -444,6 +450,7 @@ midi_synth_open(int dev, int mode)

return 1;
}
EXPORT_SYMBOL(midi_synth_open);

void
midi_synth_close(int dev)
Expand All @@ -459,11 +466,13 @@ midi_synth_close(int dev)

midi_devs[orig_dev]->close(orig_dev);
}
EXPORT_SYMBOL(midi_synth_close);

void
midi_synth_hw_control(int dev, unsigned char *event)
{
}
EXPORT_SYMBOL(midi_synth_hw_control);

int
midi_synth_load_patch(int dev, int format, const char __user *addr,
Expand Down Expand Up @@ -542,11 +551,13 @@ midi_synth_load_patch(int dev, int format, const char __user *addr,
midi_outc(orig_dev, 0xf7);
return 0;
}

EXPORT_SYMBOL(midi_synth_load_patch);

void midi_synth_panning(int dev, int channel, int pressure)
{
}

EXPORT_SYMBOL(midi_synth_panning);

void midi_synth_aftertouch(int dev, int channel, int pressure)
{
int orig_dev = synth_devs[dev]->midi_dev;
Expand Down Expand Up @@ -576,6 +587,7 @@ void midi_synth_aftertouch(int dev, int channel, int pressure)

midi_outc(orig_dev, pressure);
}
EXPORT_SYMBOL(midi_synth_aftertouch);

void
midi_synth_controller(int dev, int channel, int ctrl_num, int value)
Expand Down Expand Up @@ -604,6 +616,7 @@ midi_synth_controller(int dev, int channel, int ctrl_num, int value)
midi_outc(orig_dev, ctrl_num);
midi_outc(orig_dev, value & 0x7f);
}
EXPORT_SYMBOL(midi_synth_controller);

void
midi_synth_bender(int dev, int channel, int value)
Expand Down Expand Up @@ -635,11 +648,13 @@ midi_synth_bender(int dev, int channel, int value)
midi_outc(orig_dev, value & 0x7f);
midi_outc(orig_dev, (value >> 7) & 0x7f);
}
EXPORT_SYMBOL(midi_synth_bender);

void
midi_synth_setup_voice(int dev, int voice, int channel)
{
}
EXPORT_SYMBOL(midi_synth_setup_voice);

int
midi_synth_send_sysex(int dev, unsigned char *bytes, int len)
Expand Down Expand Up @@ -695,3 +710,5 @@ midi_synth_send_sysex(int dev, unsigned char *bytes, int len)

return 0;
}
EXPORT_SYMBOL(midi_synth_send_sysex);

11 changes: 2 additions & 9 deletions sound/oss/midibuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -414,18 +414,11 @@ unsigned int MIDIbuf_poll(int dev, struct file *file, poll_table * wait)
}


void MIDIbuf_init(void)
{
/* drag in midi_syms.o */
{
extern char midi_syms_symbol;
midi_syms_symbol = 0;
}
}

int MIDIbuf_avail(int dev)
{
if (midi_in_buf[dev])
return DATA_AVAIL (midi_in_buf[dev]);
return 0;
}
EXPORT_SYMBOL(MIDIbuf_avail);

Loading

0 comments on commit ece7f77

Please sign in to comment.