aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/sonicvibes.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/sonicvibes.c')
-rw-r--r--sound/pci/sonicvibes.c24
1 files changed, 9 insertions, 15 deletions
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index 1f6c2bfd43fd..9a35474aad05 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -591,7 +591,7 @@ static irqreturn_t snd_sonicvibes_interrupt(int irq, void *dev_id, struct pt_reg
591 return IRQ_NONE; 591 return IRQ_NONE;
592 if (status == 0xff) { /* failure */ 592 if (status == 0xff) { /* failure */
593 outb(sonic->irqmask = ~0, SV_REG(sonic, IRQMASK)); 593 outb(sonic->irqmask = ~0, SV_REG(sonic, IRQMASK));
594 snd_printk("IRQ failure - interrupts disabled!!\n"); 594 snd_printk(KERN_ERR "IRQ failure - interrupts disabled!!\n");
595 return IRQ_HANDLED; 595 return IRQ_HANDLED;
596 } 596 }
597 if (sonic->pcm) { 597 if (sonic->pcm) {
@@ -1205,14 +1205,8 @@ static int snd_sonicvibes_free(sonicvibes_t *sonic)
1205 pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port); 1205 pci_write_config_dword(sonic->pci, 0x48, sonic->dmac_port);
1206 if (sonic->irq >= 0) 1206 if (sonic->irq >= 0)
1207 free_irq(sonic->irq, (void *)sonic); 1207 free_irq(sonic->irq, (void *)sonic);
1208 if (sonic->res_dmaa) { 1208 release_and_free_resource(sonic->res_dmaa);
1209 release_resource(sonic->res_dmaa); 1209 release_and_free_resource(sonic->res_dmac);
1210 kfree_nocheck(sonic->res_dmaa);
1211 }
1212 if (sonic->res_dmac) {
1213 release_resource(sonic->res_dmac);
1214 kfree_nocheck(sonic->res_dmac);
1215 }
1216 pci_release_regions(sonic->pci); 1210 pci_release_regions(sonic->pci);
1217 pci_disable_device(sonic->pci); 1211 pci_disable_device(sonic->pci);
1218 kfree(sonic); 1212 kfree(sonic);
@@ -1245,7 +1239,7 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
1245 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1239 /* check, if we can restrict PCI DMA transfers to 24 bits */
1246 if (pci_set_dma_mask(pci, 0x00ffffff) < 0 || 1240 if (pci_set_dma_mask(pci, 0x00ffffff) < 0 ||
1247 pci_set_consistent_dma_mask(pci, 0x00ffffff) < 0) { 1241 pci_set_consistent_dma_mask(pci, 0x00ffffff) < 0) {
1248 snd_printk("architecture does not support 24bit PCI busmaster DMA\n"); 1242 snd_printk(KERN_ERR "architecture does not support 24bit PCI busmaster DMA\n");
1249 pci_disable_device(pci); 1243 pci_disable_device(pci);
1250 return -ENXIO; 1244 return -ENXIO;
1251 } 1245 }
@@ -1273,7 +1267,7 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
1273 sonic->game_port = pci_resource_start(pci, 4); 1267 sonic->game_port = pci_resource_start(pci, 4);
1274 1268
1275 if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) { 1269 if (request_irq(pci->irq, snd_sonicvibes_interrupt, SA_INTERRUPT|SA_SHIRQ, "S3 SonicVibes", (void *)sonic)) {
1276 snd_printk("unable to grab IRQ %d\n", pci->irq); 1270 snd_printk(KERN_ERR "unable to grab IRQ %d\n", pci->irq);
1277 snd_sonicvibes_free(sonic); 1271 snd_sonicvibes_free(sonic);
1278 return -EBUSY; 1272 return -EBUSY;
1279 } 1273 }
@@ -1287,24 +1281,24 @@ static int __devinit snd_sonicvibes_create(snd_card_t * card,
1287 if (!dmaa) { 1281 if (!dmaa) {
1288 dmaa = dmaio; 1282 dmaa = dmaio;
1289 dmaio += 0x10; 1283 dmaio += 0x10;
1290 snd_printk("BIOS did not allocate DDMA channel A i/o, allocated at 0x%x\n", dmaa); 1284 snd_printk(KERN_INFO "BIOS did not allocate DDMA channel A i/o, allocated at 0x%x\n", dmaa);
1291 } 1285 }
1292 if (!dmac) { 1286 if (!dmac) {
1293 dmac = dmaio; 1287 dmac = dmaio;
1294 dmaio += 0x10; 1288 dmaio += 0x10;
1295 snd_printk("BIOS did not allocate DDMA channel C i/o, allocated at 0x%x\n", dmac); 1289 snd_printk(KERN_INFO "BIOS did not allocate DDMA channel C i/o, allocated at 0x%x\n", dmac);
1296 } 1290 }
1297 pci_write_config_dword(pci, 0x40, dmaa); 1291 pci_write_config_dword(pci, 0x40, dmaa);
1298 pci_write_config_dword(pci, 0x48, dmac); 1292 pci_write_config_dword(pci, 0x48, dmac);
1299 1293
1300 if ((sonic->res_dmaa = request_region(dmaa, 0x10, "S3 SonicVibes DDMA-A")) == NULL) { 1294 if ((sonic->res_dmaa = request_region(dmaa, 0x10, "S3 SonicVibes DDMA-A")) == NULL) {
1301 snd_sonicvibes_free(sonic); 1295 snd_sonicvibes_free(sonic);
1302 snd_printk("unable to grab DDMA-A port at 0x%x-0x%x\n", dmaa, dmaa + 0x10 - 1); 1296 snd_printk(KERN_ERR "unable to grab DDMA-A port at 0x%x-0x%x\n", dmaa, dmaa + 0x10 - 1);
1303 return -EBUSY; 1297 return -EBUSY;
1304 } 1298 }
1305 if ((sonic->res_dmac = request_region(dmac, 0x10, "S3 SonicVibes DDMA-C")) == NULL) { 1299 if ((sonic->res_dmac = request_region(dmac, 0x10, "S3 SonicVibes DDMA-C")) == NULL) {
1306 snd_sonicvibes_free(sonic); 1300 snd_sonicvibes_free(sonic);
1307 snd_printk("unable to grab DDMA-C port at 0x%x-0x%x\n", dmac, dmac + 0x10 - 1); 1301 snd_printk(KERN_ERR "unable to grab DDMA-C port at 0x%x-0x%x\n", dmac, dmac + 0x10 - 1);
1308 return -EBUSY; 1302 return -EBUSY;
1309 } 1303 }
1310 1304