[ALSA] ca0106: Cosmetic changes.

Modules: CA0106 driver

Just tidying up the code. Making more functions static.

Signed-off-by: James Courtier-Dutton <James@superbug.co.uk>
This commit is contained in:
James Courtier-Dutton 2005-10-22 11:45:55 +02:00 committed by Jaroslav Kysela
parent d3d579f84e
commit 7cf4783b31
3 changed files with 17 additions and 20 deletions

View File

@ -1331,27 +1331,33 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
} }
void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr){ static void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr)
{
snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr); snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr);
} }
void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr){ static void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr)
{
snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr); snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr);
} }
unsigned char ca0106_midi_read(ca_midi_t *midi, int idx){ static unsigned char ca0106_midi_read(ca_midi_t *midi, int idx)
{
return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0); return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0);
} }
void ca0106_midi_write(ca_midi_t *midi, int data, int idx){ static void ca0106_midi_write(ca_midi_t *midi, int data, int idx)
{
snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data); snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data);
} }
snd_card_t *ca0106_dev_id_card(void *dev_id){ static snd_card_t *ca0106_dev_id_card(void *dev_id)
{
return ((ca0106_t *)dev_id)->card; return ((ca0106_t *)dev_id)->card;
} }
int ca0106_dev_id_port(void *dev_id){ static int ca0106_dev_id_port(void *dev_id)
{
return ((ca0106_t *)dev_id)->port; return ((ca0106_t *)dev_id)->port;
} }
@ -1457,19 +1463,13 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
return err; return err;
} }
#ifdef CONFIG_SND_DEBUG_DETECT snd_printdd("ca0106: probe for MIDI channel A ...");
printk("ca0106: probe for MIDI channel A ...");
#endif
if ((err = snd_ca0106_midi(chip,CA0106_MIDI_CHAN_A)) < 0) { if ((err = snd_ca0106_midi(chip,CA0106_MIDI_CHAN_A)) < 0) {
snd_card_free(card); snd_card_free(card);
#ifdef CONFIG_SND_DEBUG_DETECT snd_printdd(" failed, err=0x%x\n",err);
printk(" failed, err=0x%x\n",err);
#endif
return err; return err;
} }
#ifdef CONFIG_SND_DEBUG_DETECT snd_printdd(" done.\n");
printk(" done.\n");
#endif
snd_ca0106_proc_init(chip); snd_ca0106_proc_init(chip);

View File

@ -49,7 +49,7 @@ static void ca_midi_clear_rx(ca_midi_t *midi)
#endif #endif
} }
void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) { static void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) {
unsigned char byte; unsigned char byte;
if (midi->rmidi == NULL) { if (midi->rmidi == NULL) {
@ -258,7 +258,7 @@ static snd_rawmidi_ops_t ca_midi_input =
.trigger = ca_midi_input_trigger, .trigger = ca_midi_input_trigger,
}; };
void ca_midi_free(ca_midi_t *midi) { static void ca_midi_free(ca_midi_t *midi) {
midi->interrupt = NULL; midi->interrupt = NULL;
midi->interrupt_enable = NULL; midi->interrupt_enable = NULL;
midi->interrupt_disable = NULL; midi->interrupt_disable = NULL;

View File

@ -64,9 +64,6 @@ struct ca_midi {
int (*get_dev_id_port)(void *dev_id); int (*get_dev_id_port)(void *dev_id);
}; };
void ca_midi_interrupt(ca_midi_t *midi, unsigned int status);
int __devinit ca_midi_init(void *card, ca_midi_t *midi, int device, char *name); int __devinit ca_midi_init(void *card, ca_midi_t *midi, int device, char *name);
void ca_midi_free(ca_midi_t *midi);