aboutsummaryrefslogtreecommitdiffstats
path: root/sound/sparc/dbri.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/sparc/dbri.c')
-rw-r--r--sound/sparc/dbri.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/sound/sparc/dbri.c b/sound/sparc/dbri.c
index ee2e1b4f3551..a6b32ec34bde 100644
--- a/sound/sparc/dbri.c
+++ b/sound/sparc/dbri.c
@@ -2097,7 +2097,8 @@ static int snd_dbri_hw_params(struct snd_pcm_substream *substream,
2097 else 2097 else
2098 direction = SBUS_DMA_FROMDEVICE; 2098 direction = SBUS_DMA_FROMDEVICE;
2099 2099
2100 info->dvma_buffer = sbus_map_single(dbri->sdev, 2100 info->dvma_buffer =
2101 sbus_map_single(&dbri->sdev->ofdev.dev,
2101 runtime->dma_area, 2102 runtime->dma_area,
2102 params_buffer_bytes(hw_params), 2103 params_buffer_bytes(hw_params),
2103 direction); 2104 direction);
@@ -2125,7 +2126,7 @@ static int snd_dbri_hw_free(struct snd_pcm_substream *substream)
2125 else 2126 else
2126 direction = SBUS_DMA_FROMDEVICE; 2127 direction = SBUS_DMA_FROMDEVICE;
2127 2128
2128 sbus_unmap_single(dbri->sdev, info->dvma_buffer, 2129 sbus_unmap_single(&dbri->sdev->ofdev.dev, info->dvma_buffer,
2129 substream->runtime->buffer_size, direction); 2130 substream->runtime->buffer_size, direction);
2130 info->dvma_buffer = 0; 2131 info->dvma_buffer = 0;
2131 } 2132 }
@@ -2524,7 +2525,8 @@ static int __devinit snd_dbri_create(struct snd_card *card,
2524 dbri->sdev = sdev; 2525 dbri->sdev = sdev;
2525 dbri->irq = irq; 2526 dbri->irq = irq;
2526 2527
2527 dbri->dma = sbus_alloc_consistent(sdev, sizeof(struct dbri_dma), 2528 dbri->dma = sbus_alloc_consistent(&sdev->ofdev.dev,
2529 sizeof(struct dbri_dma),
2528 &dbri->dma_dvma); 2530 &dbri->dma_dvma);
2529 memset((void *)dbri->dma, 0, sizeof(struct dbri_dma)); 2531 memset((void *)dbri->dma, 0, sizeof(struct dbri_dma));
2530 2532
@@ -2537,7 +2539,7 @@ static int __devinit snd_dbri_create(struct snd_card *card,
2537 dbri->regs_size, "DBRI Registers"); 2539 dbri->regs_size, "DBRI Registers");
2538 if (!dbri->regs) { 2540 if (!dbri->regs) {
2539 printk(KERN_ERR "DBRI: could not allocate registers\n"); 2541 printk(KERN_ERR "DBRI: could not allocate registers\n");
2540 sbus_free_consistent(sdev, sizeof(struct dbri_dma), 2542 sbus_free_consistent(&sdev->ofdev.dev, sizeof(struct dbri_dma),
2541 (void *)dbri->dma, dbri->dma_dvma); 2543 (void *)dbri->dma, dbri->dma_dvma);
2542 return -EIO; 2544 return -EIO;
2543 } 2545 }
@@ -2547,7 +2549,7 @@ static int __devinit snd_dbri_create(struct snd_card *card,
2547 if (err) { 2549 if (err) {
2548 printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq); 2550 printk(KERN_ERR "DBRI: Can't get irq %d\n", dbri->irq);
2549 sbus_iounmap(dbri->regs, dbri->regs_size); 2551 sbus_iounmap(dbri->regs, dbri->regs_size);
2550 sbus_free_consistent(sdev, sizeof(struct dbri_dma), 2552 sbus_free_consistent(&sdev->ofdev.dev, sizeof(struct dbri_dma),
2551 (void *)dbri->dma, dbri->dma_dvma); 2553 (void *)dbri->dma, dbri->dma_dvma);
2552 return err; 2554 return err;
2553 } 2555 }
@@ -2575,7 +2577,8 @@ static void snd_dbri_free(struct snd_dbri *dbri)
2575 sbus_iounmap(dbri->regs, dbri->regs_size); 2577 sbus_iounmap(dbri->regs, dbri->regs_size);
2576 2578
2577 if (dbri->dma) 2579 if (dbri->dma)
2578 sbus_free_consistent(dbri->sdev, sizeof(struct dbri_dma), 2580 sbus_free_consistent(&dbri->sdev->ofdev.dev,
2581 sizeof(struct dbri_dma),
2579 (void *)dbri->dma, dbri->dma_dvma); 2582 (void *)dbri->dma, dbri->dma_dvma);
2580} 2583}
2581 2584