aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/dma/tegra20-apb-dma.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/dma/tegra20-apb-dma.c')
-rw-r--r--drivers/dma/tegra20-apb-dma.c12
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c
index 45fbeed1c1a5..528c62dd4b00 100644
--- a/drivers/dma/tegra20-apb-dma.c
+++ b/drivers/dma/tegra20-apb-dma.c
@@ -169,6 +169,7 @@ typedef void (*dma_isr_handler)(struct tegra_dma_channel *tdc,
169/* tegra_dma_channel: Channel specific information */ 169/* tegra_dma_channel: Channel specific information */
170struct tegra_dma_channel { 170struct tegra_dma_channel {
171 struct dma_chan dma_chan; 171 struct dma_chan dma_chan;
172 char name[30];
172 bool config_init; 173 bool config_init;
173 int id; 174 int id;
174 int irq; 175 int irq;
@@ -475,8 +476,7 @@ static void tegra_dma_abort_all(struct tegra_dma_channel *tdc)
475 while (!list_empty(&tdc->pending_sg_req)) { 476 while (!list_empty(&tdc->pending_sg_req)) {
476 sgreq = list_first_entry(&tdc->pending_sg_req, 477 sgreq = list_first_entry(&tdc->pending_sg_req,
477 typeof(*sgreq), node); 478 typeof(*sgreq), node);
478 list_del(&sgreq->node); 479 list_move_tail(&sgreq->node, &tdc->free_sg_req);
479 list_add_tail(&sgreq->node, &tdc->free_sg_req);
480 if (sgreq->last_sg) { 480 if (sgreq->last_sg) {
481 dma_desc = sgreq->dma_desc; 481 dma_desc = sgreq->dma_desc;
482 dma_desc->dma_status = DMA_ERROR; 482 dma_desc->dma_status = DMA_ERROR;
@@ -570,8 +570,7 @@ static void handle_cont_sngl_cycle_dma_done(struct tegra_dma_channel *tdc,
570 570
571 /* If not last req then put at end of pending list */ 571 /* If not last req then put at end of pending list */
572 if (!list_is_last(&sgreq->node, &tdc->pending_sg_req)) { 572 if (!list_is_last(&sgreq->node, &tdc->pending_sg_req)) {
573 list_del(&sgreq->node); 573 list_move_tail(&sgreq->node, &tdc->pending_sg_req);
574 list_add_tail(&sgreq->node, &tdc->pending_sg_req);
575 sgreq->configured = false; 574 sgreq->configured = false;
576 st = handle_continuous_head_request(tdc, sgreq, to_terminate); 575 st = handle_continuous_head_request(tdc, sgreq, to_terminate);
577 if (!st) 576 if (!st)
@@ -1284,7 +1283,6 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)
1284 INIT_LIST_HEAD(&tdma->dma_dev.channels); 1283 INIT_LIST_HEAD(&tdma->dma_dev.channels);
1285 for (i = 0; i < cdata->nr_channels; i++) { 1284 for (i = 0; i < cdata->nr_channels; i++) {
1286 struct tegra_dma_channel *tdc = &tdma->channels[i]; 1285 struct tegra_dma_channel *tdc = &tdma->channels[i];
1287 char irq_name[30];
1288 1286
1289 tdc->chan_base_offset = TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET + 1287 tdc->chan_base_offset = TEGRA_APBDMA_CHANNEL_BASE_ADD_OFFSET +
1290 i * TEGRA_APBDMA_CHANNEL_REGISTER_SIZE; 1288 i * TEGRA_APBDMA_CHANNEL_REGISTER_SIZE;
@@ -1296,9 +1294,9 @@ static int __devinit tegra_dma_probe(struct platform_device *pdev)
1296 goto err_irq; 1294 goto err_irq;
1297 } 1295 }
1298 tdc->irq = res->start; 1296 tdc->irq = res->start;
1299 snprintf(irq_name, sizeof(irq_name), "apbdma.%d", i); 1297 snprintf(tdc->name, sizeof(tdc->name), "apbdma.%d", i);
1300 ret = devm_request_irq(&pdev->dev, tdc->irq, 1298 ret = devm_request_irq(&pdev->dev, tdc->irq,
1301 tegra_dma_isr, 0, irq_name, tdc); 1299 tegra_dma_isr, 0, tdc->name, tdc);
1302 if (ret) { 1300 if (ret) {
1303 dev_err(&pdev->dev, 1301 dev_err(&pdev->dev,
1304 "request_irq failed with err %d channel %d\n", 1302 "request_irq failed with err %d channel %d\n",