Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[PATCH] kill sound/oss/*_syms.c

Move all EXPORT_SYMBOL's from sound/oss/*_syms.c to the files with the
actual functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>

authored by

Adrian Bunk and committed by
Linus Torvalds
ece7f77b d56b9b9c

+93 -168
+4 -4
sound/oss/Makefile
··· 63 63 # Declare multi-part drivers. 64 64 65 65 sound-objs := \ 66 - dev_table.o soundcard.o sound_syms.o \ 67 - audio.o audio_syms.o dmabuf.o \ 68 - midi_syms.o midi_synth.o midibuf.o \ 69 - sequencer.o sequencer_syms.o sound_timer.o sys_timer.o 66 + dev_table.o soundcard.o \ 67 + audio.o dmabuf.o \ 68 + midi_synth.o midibuf.o \ 69 + sequencer.o sound_timer.o sys_timer.o 70 70 71 71 pas2-objs := pas2_card.o pas2_midi.o pas2_mixer.o pas2_pcm.o 72 72 sb-objs := sb_card.o
-14
sound/oss/audio_syms.c
··· 1 - /* 2 - * Exported symbols for audio driver. 3 - */ 4 - 5 - #include <linux/module.h> 6 - 7 - char audio_syms_symbol; 8 - 9 - #include "sound_config.h" 10 - #include "sound_calls.h" 11 - 12 - EXPORT_SYMBOL(DMAbuf_start_dma); 13 - EXPORT_SYMBOL(DMAbuf_inputintr); 14 - EXPORT_SYMBOL(DMAbuf_outputintr);
+43 -1
sound/oss/dev_table.c
··· 13 13 14 14 #include <linux/init.h> 15 15 16 - #define _DEV_TABLE_C_ 17 16 #include "sound_config.h" 17 + 18 + struct audio_operations *audio_devs[MAX_AUDIO_DEV]; 19 + EXPORT_SYMBOL(audio_devs); 20 + 21 + int num_audiodevs; 22 + EXPORT_SYMBOL(num_audiodevs); 23 + 24 + struct mixer_operations *mixer_devs[MAX_MIXER_DEV]; 25 + EXPORT_SYMBOL(mixer_devs); 26 + 27 + int num_mixers; 28 + EXPORT_SYMBOL(num_mixers); 29 + 30 + struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV]; 31 + EXPORT_SYMBOL(synth_devs); 32 + 33 + int num_synths; 34 + 35 + struct midi_operations *midi_devs[MAX_MIDI_DEV]; 36 + EXPORT_SYMBOL(midi_devs); 37 + 38 + int num_midis; 39 + EXPORT_SYMBOL(num_midis); 40 + 41 + struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = { 42 + &default_sound_timer, NULL 43 + }; 44 + EXPORT_SYMBOL(sound_timer_devs); 45 + 46 + int num_sound_timers = 1; 47 + 18 48 19 49 static int sound_alloc_audiodev(void); 20 50 ··· 105 75 audio_init_devices(); 106 76 return num; 107 77 } 78 + EXPORT_SYMBOL(sound_install_audiodrv); 108 79 109 80 int sound_install_mixer(int vers, char *name, struct mixer_operations *driver, 110 81 int driver_size, void *devc) ··· 144 113 mixer_devs[n] = op; 145 114 return n; 146 115 } 116 + EXPORT_SYMBOL(sound_install_mixer); 147 117 148 118 void sound_unload_audiodev(int dev) 149 119 { ··· 154 122 unregister_sound_dsp((dev<<4)+3); 155 123 } 156 124 } 125 + EXPORT_SYMBOL(sound_unload_audiodev); 157 126 158 127 static int sound_alloc_audiodev(void) 159 128 { ··· 177 144 num_midis = i + 1; 178 145 return i; 179 146 } 147 + EXPORT_SYMBOL(sound_alloc_mididev); 180 148 181 149 int sound_alloc_synthdev(void) 182 150 { ··· 192 158 } 193 159 return -1; 194 160 } 161 + EXPORT_SYMBOL(sound_alloc_synthdev); 195 162 196 163 int sound_alloc_mixerdev(void) 197 164 { ··· 204 169 num_mixers = i + 1; 205 170 return i; 206 171 } 172 + EXPORT_SYMBOL(sound_alloc_mixerdev); 207 173 208 174 int sound_alloc_timerdev(void) 209 175 { ··· 219 183 } 220 184 return -1; 221 185 } 186 + EXPORT_SYMBOL(sound_alloc_timerdev); 222 187 223 188 void sound_unload_mixerdev(int dev) 224 189 { ··· 229 192 num_mixers--; 230 193 } 231 194 } 195 + EXPORT_SYMBOL(sound_unload_mixerdev); 232 196 233 197 void sound_unload_mididev(int dev) 234 198 { ··· 238 200 unregister_sound_midi((dev<<4)+2); 239 201 } 240 202 } 203 + EXPORT_SYMBOL(sound_unload_mididev); 241 204 242 205 void sound_unload_synthdev(int dev) 243 206 { 244 207 if (dev != -1) 245 208 synth_devs[dev] = NULL; 246 209 } 210 + EXPORT_SYMBOL(sound_unload_synthdev); 247 211 248 212 void sound_unload_timerdev(int dev) 249 213 { 250 214 if (dev != -1) 251 215 sound_timer_devs[dev] = NULL; 252 216 } 217 + EXPORT_SYMBOL(sound_unload_timerdev); 218 +
+1 -16
sound/oss/dev_table.h
··· 352 352 void (*arm_timer)(int dev, long time); 353 353 }; 354 354 355 - #ifdef _DEV_TABLE_C_ 356 - struct audio_operations *audio_devs[MAX_AUDIO_DEV]; 357 - int num_audiodevs; 358 - struct mixer_operations *mixer_devs[MAX_MIXER_DEV]; 359 - int num_mixers; 360 - struct synth_operations *synth_devs[MAX_SYNTH_DEV+MAX_MIDI_DEV]; 361 - int num_synths; 362 - struct midi_operations *midi_devs[MAX_MIDI_DEV]; 363 - int num_midis; 364 - 365 355 extern struct sound_timer_operations default_sound_timer; 366 - struct sound_timer_operations *sound_timer_devs[MAX_TIMER_DEV] = { 367 - &default_sound_timer, NULL 368 - }; 369 - int num_sound_timers = 1; 370 - #else 356 + 371 357 extern struct audio_operations *audio_devs[MAX_AUDIO_DEV]; 372 358 extern int num_audiodevs; 373 359 extern struct mixer_operations *mixer_devs[MAX_MIXER_DEV]; ··· 364 378 extern int num_midis; 365 379 extern struct sound_timer_operations * sound_timer_devs[MAX_TIMER_DEV]; 366 380 extern int num_sound_timers; 367 - #endif /* _DEV_TABLE_C_ */ 368 381 369 382 extern int sound_map_buffer (int dev, struct dma_buffparms *dmap, buffmem_desc *info); 370 383 void sound_timer_init (struct sound_lowlev_timer *t, char *name);
+4 -6
sound/oss/dmabuf.c
··· 926 926 sound_start_dma(dmap, physaddr, count, dma_mode); 927 927 return count; 928 928 } 929 + EXPORT_SYMBOL(DMAbuf_start_dma); 929 930 930 931 static int local_start_dma(struct audio_operations *adev, unsigned long physaddr, int count, int dma_mode) 931 932 { ··· 1056 1055 do_outputintr(dev, notify_only); 1057 1056 spin_unlock_irqrestore(&dmap->lock,flags); 1058 1057 } 1058 + EXPORT_SYMBOL(DMAbuf_outputintr); 1059 + 1059 1060 /* called with dmap->lock held in irq context */ 1060 1061 static void do_inputintr(int dev) 1061 1062 { ··· 1157 1154 do_inputintr(dev); 1158 1155 spin_unlock_irqrestore(&dmap->lock,flags); 1159 1156 } 1157 + EXPORT_SYMBOL(DMAbuf_inputintr); 1160 1158 1161 1159 void DMAbuf_init(int dev, int dma1, int dma2) 1162 1160 { ··· 1165 1161 /* 1166 1162 * NOTE! This routine could be called several times. 1167 1163 */ 1168 - 1169 - /* drag in audio_syms.o */ 1170 - { 1171 - extern char audio_syms_symbol; 1172 - audio_syms_symbol = 0; 1173 - } 1174 1164 1175 1165 if (adev && adev->dmap_out == NULL) { 1176 1166 if (adev->d == NULL)
-29
sound/oss/midi_syms.c
··· 1 - /* 2 - * Exported symbols for midi driver. 3 - */ 4 - 5 - #include <linux/module.h> 6 - 7 - char midi_syms_symbol; 8 - 9 - #include "sound_config.h" 10 - #define _MIDI_SYNTH_C_ 11 - #include "midi_synth.h" 12 - 13 - EXPORT_SYMBOL(do_midi_msg); 14 - EXPORT_SYMBOL(midi_synth_open); 15 - EXPORT_SYMBOL(midi_synth_close); 16 - EXPORT_SYMBOL(midi_synth_ioctl); 17 - EXPORT_SYMBOL(midi_synth_kill_note); 18 - EXPORT_SYMBOL(midi_synth_start_note); 19 - EXPORT_SYMBOL(midi_synth_set_instr); 20 - EXPORT_SYMBOL(midi_synth_reset); 21 - EXPORT_SYMBOL(midi_synth_hw_control); 22 - EXPORT_SYMBOL(midi_synth_aftertouch); 23 - EXPORT_SYMBOL(midi_synth_controller); 24 - EXPORT_SYMBOL(midi_synth_panning); 25 - EXPORT_SYMBOL(midi_synth_setup_voice); 26 - EXPORT_SYMBOL(midi_synth_send_sysex); 27 - EXPORT_SYMBOL(midi_synth_bender); 28 - EXPORT_SYMBOL(midi_synth_load_patch); 29 - EXPORT_SYMBOL(MIDIbuf_avail);
+19 -2
sound/oss/midi_synth.c
··· 84 84 ; 85 85 } 86 86 } 87 + EXPORT_SYMBOL(do_midi_msg); 87 88 88 89 static void 89 90 midi_outc(int midi_dev, int data) ··· 277 276 return -EINVAL; 278 277 } 279 278 } 279 + EXPORT_SYMBOL(midi_synth_ioctl); 280 280 281 281 int 282 282 midi_synth_kill_note(int dev, int channel, int note, int velocity) ··· 344 342 345 343 return 0; 346 344 } 345 + EXPORT_SYMBOL(midi_synth_kill_note); 347 346 348 347 int 349 348 midi_synth_set_instr(int dev, int channel, int instr_no) ··· 367 364 368 365 return 0; 369 366 } 367 + EXPORT_SYMBOL(midi_synth_set_instr); 370 368 371 369 int 372 370 midi_synth_start_note(int dev, int channel, int note, int velocity) ··· 409 405 } 410 406 return 0; 411 407 } 408 + EXPORT_SYMBOL(midi_synth_start_note); 412 409 413 410 void 414 411 midi_synth_reset(int dev) ··· 417 412 418 413 leave_sysex(dev); 419 414 } 415 + EXPORT_SYMBOL(midi_synth_reset); 420 416 421 417 int 422 418 midi_synth_open(int dev, int mode) ··· 450 444 451 445 return 1; 452 446 } 447 + EXPORT_SYMBOL(midi_synth_open); 453 448 454 449 void 455 450 midi_synth_close(int dev) ··· 466 459 467 460 midi_devs[orig_dev]->close(orig_dev); 468 461 } 462 + EXPORT_SYMBOL(midi_synth_close); 469 463 470 464 void 471 465 midi_synth_hw_control(int dev, unsigned char *event) 472 466 { 473 467 } 468 + EXPORT_SYMBOL(midi_synth_hw_control); 474 469 475 470 int 476 471 midi_synth_load_patch(int dev, int format, const char __user *addr, ··· 551 542 midi_outc(orig_dev, 0xf7); 552 543 return 0; 553 544 } 554 - 545 + EXPORT_SYMBOL(midi_synth_load_patch); 546 + 555 547 void midi_synth_panning(int dev, int channel, int pressure) 556 548 { 557 549 } 558 - 550 + EXPORT_SYMBOL(midi_synth_panning); 551 + 559 552 void midi_synth_aftertouch(int dev, int channel, int pressure) 560 553 { 561 554 int orig_dev = synth_devs[dev]->midi_dev; ··· 587 576 588 577 midi_outc(orig_dev, pressure); 589 578 } 579 + EXPORT_SYMBOL(midi_synth_aftertouch); 590 580 591 581 void 592 582 midi_synth_controller(int dev, int channel, int ctrl_num, int value) ··· 616 604 midi_outc(orig_dev, ctrl_num); 617 605 midi_outc(orig_dev, value & 0x7f); 618 606 } 607 + EXPORT_SYMBOL(midi_synth_controller); 619 608 620 609 void 621 610 midi_synth_bender(int dev, int channel, int value) ··· 648 635 midi_outc(orig_dev, value & 0x7f); 649 636 midi_outc(orig_dev, (value >> 7) & 0x7f); 650 637 } 638 + EXPORT_SYMBOL(midi_synth_bender); 651 639 652 640 void 653 641 midi_synth_setup_voice(int dev, int voice, int channel) 654 642 { 655 643 } 644 + EXPORT_SYMBOL(midi_synth_setup_voice); 656 645 657 646 int 658 647 midi_synth_send_sysex(int dev, unsigned char *bytes, int len) ··· 710 695 711 696 return 0; 712 697 } 698 + EXPORT_SYMBOL(midi_synth_send_sysex); 699 +
+2 -9
sound/oss/midibuf.c
··· 414 414 } 415 415 416 416 417 - void MIDIbuf_init(void) 418 - { 419 - /* drag in midi_syms.o */ 420 - { 421 - extern char midi_syms_symbol; 422 - midi_syms_symbol = 0; 423 - } 424 - } 425 - 426 417 int MIDIbuf_avail(int dev) 427 418 { 428 419 if (midi_in_buf[dev]) 429 420 return DATA_AVAIL (midi_in_buf[dev]); 430 421 return 0; 431 422 } 423 + EXPORT_SYMBOL(MIDIbuf_avail); 424 +
+6 -8
sound/oss/sequencer.c
··· 156 156 wake_up(&midi_sleeper); 157 157 spin_unlock_irqrestore(&lock,flags); 158 158 } 159 + EXPORT_SYMBOL(seq_copy_to_input); 159 160 160 161 static void sequencer_midi_input(int dev, unsigned char data) 161 162 { ··· 206 205 } 207 206 seq_copy_to_input(event_rec, len); 208 207 } 208 + EXPORT_SYMBOL(seq_input_event); 209 209 210 210 int sequencer_write(int dev, struct file *file, const char __user *buf, int count) 211 211 { ··· 1555 1553 { 1556 1554 seq_startplay(); 1557 1555 } 1556 + EXPORT_SYMBOL(sequencer_timer); 1558 1557 1559 1558 int note_to_freq(int note_num) 1560 1559 { ··· 1589 1586 1590 1587 return note_freq; 1591 1588 } 1589 + EXPORT_SYMBOL(note_to_freq); 1592 1590 1593 1591 unsigned long compute_finetune(unsigned long base_freq, int bend, int range, 1594 1592 int vibrato_cents) ··· 1643 1639 else 1644 1640 return (base_freq * amount) / 10000; /* Bend up */ 1645 1641 } 1646 - 1642 + EXPORT_SYMBOL(compute_finetune); 1647 1643 1648 1644 void sequencer_init(void) 1649 1645 { 1650 - /* drag in sequencer_syms.o */ 1651 - { 1652 - extern char sequencer_syms_symbol; 1653 - sequencer_syms_symbol = 0; 1654 - } 1655 - 1656 1646 if (sequencer_ok) 1657 1647 return; 1658 - MIDIbuf_init(); 1659 1648 queue = (unsigned char *)vmalloc(SEQ_MAX_QUEUE * EV_SZ); 1660 1649 if (queue == NULL) 1661 1650 { ··· 1664 1667 } 1665 1668 sequencer_ok = 1; 1666 1669 } 1670 + EXPORT_SYMBOL(sequencer_init); 1667 1671 1668 1672 void sequencer_unload(void) 1669 1673 {
-22
sound/oss/sequencer_syms.c
··· 1 - /* 2 - * Exported symbols for sequencer driver. 3 - */ 4 - 5 - #include <linux/module.h> 6 - 7 - char sequencer_syms_symbol; 8 - 9 - #include "sound_config.h" 10 - #include "sound_calls.h" 11 - 12 - EXPORT_SYMBOL(note_to_freq); 13 - EXPORT_SYMBOL(compute_finetune); 14 - EXPORT_SYMBOL(seq_copy_to_input); 15 - EXPORT_SYMBOL(seq_input_event); 16 - EXPORT_SYMBOL(sequencer_init); 17 - EXPORT_SYMBOL(sequencer_timer); 18 - 19 - EXPORT_SYMBOL(sound_timer_init); 20 - EXPORT_SYMBOL(sound_timer_interrupt); 21 - EXPORT_SYMBOL(sound_timer_syncinterval); 22 -
-1
sound/oss/sound_calls.h
··· 71 71 int MIDIbuf_avail(int dev); 72 72 73 73 void MIDIbuf_bytes_received(int dev, unsigned char *buf, int count); 74 - void MIDIbuf_init(void); 75 74 76 75 77 76 /* From soundcard.c */
-50
sound/oss/sound_syms.c
··· 1 - /* 2 - * The sound core exports the following symbols to the rest of 3 - * modulespace. 4 - * 5 - * (C) Copyright 1997 Alan Cox, Licensed under the GNU GPL 6 - * 7 - * Thu May 27 1999 Andrew J. Kroll <ag784@freenet..buffalo..edu> 8 - * left out exported symbol... fixed 9 - */ 10 - 11 - #include <linux/module.h> 12 - #include "sound_config.h" 13 - #include "sound_calls.h" 14 - 15 - char sound_syms_symbol; 16 - 17 - EXPORT_SYMBOL(mixer_devs); 18 - EXPORT_SYMBOL(audio_devs); 19 - EXPORT_SYMBOL(num_mixers); 20 - EXPORT_SYMBOL(num_audiodevs); 21 - 22 - EXPORT_SYMBOL(midi_devs); 23 - EXPORT_SYMBOL(num_midis); 24 - EXPORT_SYMBOL(synth_devs); 25 - 26 - EXPORT_SYMBOL(sound_timer_devs); 27 - 28 - EXPORT_SYMBOL(sound_install_audiodrv); 29 - EXPORT_SYMBOL(sound_install_mixer); 30 - EXPORT_SYMBOL(sound_alloc_dma); 31 - EXPORT_SYMBOL(sound_free_dma); 32 - EXPORT_SYMBOL(sound_open_dma); 33 - EXPORT_SYMBOL(sound_close_dma); 34 - EXPORT_SYMBOL(sound_alloc_mididev); 35 - EXPORT_SYMBOL(sound_alloc_mixerdev); 36 - EXPORT_SYMBOL(sound_alloc_timerdev); 37 - EXPORT_SYMBOL(sound_alloc_synthdev); 38 - EXPORT_SYMBOL(sound_unload_audiodev); 39 - EXPORT_SYMBOL(sound_unload_mididev); 40 - EXPORT_SYMBOL(sound_unload_mixerdev); 41 - EXPORT_SYMBOL(sound_unload_timerdev); 42 - EXPORT_SYMBOL(sound_unload_synthdev); 43 - 44 - EXPORT_SYMBOL(load_mixer_volumes); 45 - 46 - EXPORT_SYMBOL(conf_printf); 47 - EXPORT_SYMBOL(conf_printf2); 48 - 49 - MODULE_DESCRIPTION("OSS Sound subsystem"); 50 - MODULE_AUTHOR("Hannu Savolainen, et al.");
+4
sound/oss/sound_timer.c
··· 76 76 tmr_ctr = 0; 77 77 usecs_per_tmr = new_usecs; 78 78 } 79 + EXPORT_SYMBOL(sound_timer_syncinterval); 79 80 80 81 static void tmr_reset(void) 81 82 { ··· 301 300 } 302 301 spin_unlock_irqrestore(&lock,flags); 303 302 } 303 + EXPORT_SYMBOL(sound_timer_interrupt); 304 304 305 305 void sound_timer_init(struct sound_lowlev_timer *t, char *name) 306 306 { ··· 323 321 strcpy(sound_timer.info.name, name); 324 322 sound_timer_devs[n] = &sound_timer; 325 323 } 324 + EXPORT_SYMBOL(sound_timer_init); 325 +
+10 -6
sound/oss/soundcard.c
··· 107 107 mixer_vols[n].levels[i] = levels[i]; 108 108 return mixer_vols[n].levels; 109 109 } 110 + EXPORT_SYMBOL(load_mixer_volumes); 110 111 111 112 static int set_mixer_levels(void __user * arg) 112 113 { ··· 542 541 int err; 543 542 int i, j; 544 543 545 - /* drag in sound_syms.o */ 546 - { 547 - extern char sound_syms_symbol; 548 - sound_syms_symbol = 0; 549 - } 550 - 551 544 #ifdef CONFIG_PCI 552 545 if(dmabug) 553 546 isa_dma_bridge_buggy = dmabug; ··· 609 614 module_init(oss_init); 610 615 module_exit(oss_cleanup); 611 616 MODULE_LICENSE("GPL"); 617 + MODULE_DESCRIPTION("OSS Sound subsystem"); 618 + MODULE_AUTHOR("Hannu Savolainen, et al."); 612 619 613 620 614 621 int sound_alloc_dma(int chn, char *deviceID) ··· 624 627 625 628 return 0; 626 629 } 630 + EXPORT_SYMBOL(sound_alloc_dma); 627 631 628 632 int sound_open_dma(int chn, char *deviceID) 629 633 { ··· 640 642 dma_alloc_map[chn] = DMA_MAP_BUSY; 641 643 return 0; 642 644 } 645 + EXPORT_SYMBOL(sound_open_dma); 643 646 644 647 void sound_free_dma(int chn) 645 648 { ··· 651 652 free_dma(chn); 652 653 dma_alloc_map[chn] = DMA_MAP_UNAVAIL; 653 654 } 655 + EXPORT_SYMBOL(sound_free_dma); 654 656 655 657 void sound_close_dma(int chn) 656 658 { ··· 661 661 } 662 662 dma_alloc_map[chn] = DMA_MAP_FREE; 663 663 } 664 + EXPORT_SYMBOL(sound_close_dma); 664 665 665 666 static void do_sequencer_timer(unsigned long dummy) 666 667 { ··· 715 714 printk("\n"); 716 715 #endif 717 716 } 717 + EXPORT_SYMBOL(conf_printf); 718 718 719 719 void conf_printf2(char *name, int base, int irq, int dma, int dma2) 720 720 { ··· 736 734 printk("\n"); 737 735 #endif 738 736 } 737 + EXPORT_SYMBOL(conf_printf2); 738 +