aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorJames Courtier-Dutton <James@superbug.co.uk>2005-10-22 05:45:55 -0400
committerJaroslav Kysela <perex@suse.cz>2005-11-04 07:19:37 -0500
commit7cf4783b31607ad13b84bed14ea2ca446364985a (patch)
tree0774e3f2d1474b82270e624cdc17f5ef010439b7 /sound/pci
parentd3d579f84ebf701dedd22ba696d1738ed6759ef7 (diff)
[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>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ca0106/ca0106_main.c30
-rw-r--r--sound/pci/ca0106/ca_midi.c4
-rw-r--r--sound/pci/ca0106/ca_midi.h3
3 files changed, 17 insertions, 20 deletions
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index aaaef9e66af..ee58d16002e 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1331,27 +1331,33 @@ static int __devinit snd_ca0106_create(snd_card_t *card,
1331} 1331}
1332 1332
1333 1333
1334void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr){ 1334static void ca0106_midi_interrupt_enable(ca_midi_t *midi, int intr)
1335{
1335 snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr); 1336 snd_ca0106_intr_enable((ca0106_t *)(midi->dev_id), intr);
1336} 1337}
1337 1338
1338void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr){ 1339static void ca0106_midi_interrupt_disable(ca_midi_t *midi, int intr)
1340{
1339 snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr); 1341 snd_ca0106_intr_disable((ca0106_t *)(midi->dev_id), intr);
1340} 1342}
1341 1343
1342unsigned char ca0106_midi_read(ca_midi_t *midi, int idx){ 1344static unsigned char ca0106_midi_read(ca_midi_t *midi, int idx)
1345{
1343 return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0); 1346 return (unsigned char)snd_ca0106_ptr_read((ca0106_t *)(midi->dev_id), midi->port + idx, 0);
1344} 1347}
1345 1348
1346void ca0106_midi_write(ca_midi_t *midi, int data, int idx){ 1349static void ca0106_midi_write(ca_midi_t *midi, int data, int idx)
1350{
1347 snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data); 1351 snd_ca0106_ptr_write((ca0106_t *)(midi->dev_id), midi->port + idx, 0, data);
1348} 1352}
1349 1353
1350snd_card_t *ca0106_dev_id_card(void *dev_id){ 1354static snd_card_t *ca0106_dev_id_card(void *dev_id)
1355{
1351 return ((ca0106_t *)dev_id)->card; 1356 return ((ca0106_t *)dev_id)->card;
1352} 1357}
1353 1358
1354int ca0106_dev_id_port(void *dev_id){ 1359static int ca0106_dev_id_port(void *dev_id)
1360{
1355 return ((ca0106_t *)dev_id)->port; 1361 return ((ca0106_t *)dev_id)->port;
1356} 1362}
1357 1363
@@ -1457,19 +1463,13 @@ static int __devinit snd_ca0106_probe(struct pci_dev *pci,
1457 return err; 1463 return err;
1458 } 1464 }
1459 1465
1460#ifdef CONFIG_SND_DEBUG_DETECT 1466 snd_printdd("ca0106: probe for MIDI channel A ...");
1461 printk("ca0106: probe for MIDI channel A ...");
1462#endif
1463 if ((err = snd_ca0106_midi(chip,CA0106_MIDI_CHAN_A)) < 0) { 1467 if ((err = snd_ca0106_midi(chip,CA0106_MIDI_CHAN_A)) < 0) {
1464 snd_card_free(card); 1468 snd_card_free(card);
1465#ifdef CONFIG_SND_DEBUG_DETECT 1469 snd_printdd(" failed, err=0x%x\n",err);
1466 printk(" failed, err=0x%x\n",err);
1467#endif
1468 return err; 1470 return err;
1469 } 1471 }
1470#ifdef CONFIG_SND_DEBUG_DETECT 1472 snd_printdd(" done.\n");
1471 printk(" done.\n");
1472#endif
1473 1473
1474 snd_ca0106_proc_init(chip); 1474 snd_ca0106_proc_init(chip);
1475 1475
diff --git a/sound/pci/ca0106/ca_midi.c b/sound/pci/ca0106/ca_midi.c
index f439d14876b..9cc0c67ace9 100644
--- a/sound/pci/ca0106/ca_midi.c
+++ b/sound/pci/ca0106/ca_midi.c
@@ -49,7 +49,7 @@ static void ca_midi_clear_rx(ca_midi_t *midi)
49#endif 49#endif
50} 50}
51 51
52void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) { 52static void ca_midi_interrupt(ca_midi_t *midi, unsigned int status) {
53 unsigned char byte; 53 unsigned char byte;
54 54
55 if (midi->rmidi == NULL) { 55 if (midi->rmidi == NULL) {
@@ -258,7 +258,7 @@ static snd_rawmidi_ops_t ca_midi_input =
258 .trigger = ca_midi_input_trigger, 258 .trigger = ca_midi_input_trigger,
259}; 259};
260 260
261void ca_midi_free(ca_midi_t *midi) { 261static void ca_midi_free(ca_midi_t *midi) {
262 midi->interrupt = NULL; 262 midi->interrupt = NULL;
263 midi->interrupt_enable = NULL; 263 midi->interrupt_enable = NULL;
264 midi->interrupt_disable = NULL; 264 midi->interrupt_disable = NULL;
diff --git a/sound/pci/ca0106/ca_midi.h b/sound/pci/ca0106/ca_midi.h
index 95c8e1c170b..b452cec2bf5 100644
--- a/sound/pci/ca0106/ca_midi.h
+++ b/sound/pci/ca0106/ca_midi.h
@@ -64,9 +64,6 @@ struct ca_midi {
64 int (*get_dev_id_port)(void *dev_id); 64 int (*get_dev_id_port)(void *dev_id);
65}; 65};
66 66
67void ca_midi_interrupt(ca_midi_t *midi, unsigned int status);
68
69int __devinit ca_midi_init(void *card, ca_midi_t *midi, int device, char *name); 67int __devinit ca_midi_init(void *card, ca_midi_t *midi, int device, char *name);
70 68
71void ca_midi_free(ca_midi_t *midi);
72 69