diff options
-rw-r--r-- | drivers/dma/at_hdmac.c | 5 | ||||
-rw-r--r-- | drivers/dma/dw_dmac.c | 5 | ||||
-rw-r--r-- | drivers/dma/intel_mid_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/mpc512x_dma.c | 1 | ||||
-rw-r--r-- | drivers/dma/pch_dma.c | 2 | ||||
-rw-r--r-- | drivers/dma/pl330.c | 2 | ||||
-rw-r--r-- | drivers/dma/timb_dma.c | 3 |
7 files changed, 5 insertions, 15 deletions
diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 3b99dc62874b..fcfa0a8b5c59 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c | |||
@@ -1268,12 +1268,11 @@ static int __init at_dma_probe(struct platform_device *pdev) | |||
1268 | 1268 | ||
1269 | /* initialize channels related values */ | 1269 | /* initialize channels related values */ |
1270 | INIT_LIST_HEAD(&atdma->dma_common.channels); | 1270 | INIT_LIST_HEAD(&atdma->dma_common.channels); |
1271 | for (i = 0; i < pdata->nr_channels; i++, atdma->dma_common.chancnt++) { | 1271 | for (i = 0; i < pdata->nr_channels; i++) { |
1272 | struct at_dma_chan *atchan = &atdma->chan[i]; | 1272 | struct at_dma_chan *atchan = &atdma->chan[i]; |
1273 | 1273 | ||
1274 | atchan->chan_common.device = &atdma->dma_common; | 1274 | atchan->chan_common.device = &atdma->dma_common; |
1275 | atchan->chan_common.cookie = atchan->completed_cookie = 1; | 1275 | atchan->chan_common.cookie = atchan->completed_cookie = 1; |
1276 | atchan->chan_common.chan_id = i; | ||
1277 | list_add_tail(&atchan->chan_common.device_node, | 1276 | list_add_tail(&atchan->chan_common.device_node, |
1278 | &atdma->dma_common.channels); | 1277 | &atdma->dma_common.channels); |
1279 | 1278 | ||
@@ -1314,7 +1313,7 @@ static int __init at_dma_probe(struct platform_device *pdev) | |||
1314 | dev_info(&pdev->dev, "Atmel AHB DMA Controller ( %s%s), %d channels\n", | 1313 | dev_info(&pdev->dev, "Atmel AHB DMA Controller ( %s%s), %d channels\n", |
1315 | dma_has_cap(DMA_MEMCPY, atdma->dma_common.cap_mask) ? "cpy " : "", | 1314 | dma_has_cap(DMA_MEMCPY, atdma->dma_common.cap_mask) ? "cpy " : "", |
1316 | dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask) ? "slave " : "", | 1315 | dma_has_cap(DMA_SLAVE, atdma->dma_common.cap_mask) ? "slave " : "", |
1317 | atdma->dma_common.chancnt); | 1316 | pdata->nr_channels); |
1318 | 1317 | ||
1319 | dma_async_device_register(&atdma->dma_common); | 1318 | dma_async_device_register(&atdma->dma_common); |
1320 | 1319 | ||
diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c index 4d180ca9a1d8..9bfd6d360718 100644 --- a/drivers/dma/dw_dmac.c +++ b/drivers/dma/dw_dmac.c | |||
@@ -1407,12 +1407,11 @@ static int __init dw_probe(struct platform_device *pdev) | |||
1407 | dw->all_chan_mask = (1 << pdata->nr_channels) - 1; | 1407 | dw->all_chan_mask = (1 << pdata->nr_channels) - 1; |
1408 | 1408 | ||
1409 | INIT_LIST_HEAD(&dw->dma.channels); | 1409 | INIT_LIST_HEAD(&dw->dma.channels); |
1410 | for (i = 0; i < pdata->nr_channels; i++, dw->dma.chancnt++) { | 1410 | for (i = 0; i < pdata->nr_channels; i++) { |
1411 | struct dw_dma_chan *dwc = &dw->chan[i]; | 1411 | struct dw_dma_chan *dwc = &dw->chan[i]; |
1412 | 1412 | ||
1413 | dwc->chan.device = &dw->dma; | 1413 | dwc->chan.device = &dw->dma; |
1414 | dwc->chan.cookie = dwc->completed = 1; | 1414 | dwc->chan.cookie = dwc->completed = 1; |
1415 | dwc->chan.chan_id = i; | ||
1416 | if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING) | 1415 | if (pdata->chan_allocation_order == CHAN_ALLOCATION_ASCENDING) |
1417 | list_add_tail(&dwc->chan.device_node, | 1416 | list_add_tail(&dwc->chan.device_node, |
1418 | &dw->dma.channels); | 1417 | &dw->dma.channels); |
@@ -1468,7 +1467,7 @@ static int __init dw_probe(struct platform_device *pdev) | |||
1468 | dma_writel(dw, CFG, DW_CFG_DMA_EN); | 1467 | dma_writel(dw, CFG, DW_CFG_DMA_EN); |
1469 | 1468 | ||
1470 | printk(KERN_INFO "%s: DesignWare DMA Controller, %d channels\n", | 1469 | printk(KERN_INFO "%s: DesignWare DMA Controller, %d channels\n", |
1471 | dev_name(&pdev->dev), dw->dma.chancnt); | 1470 | dev_name(&pdev->dev), pdata->nr_channels); |
1472 | 1471 | ||
1473 | dma_async_device_register(&dw->dma); | 1472 | dma_async_device_register(&dw->dma); |
1474 | 1473 | ||
diff --git a/drivers/dma/intel_mid_dma.c b/drivers/dma/intel_mid_dma.c index 8a3fdd87db97..cf74a664c5e0 100644 --- a/drivers/dma/intel_mid_dma.c +++ b/drivers/dma/intel_mid_dma.c | |||
@@ -1114,7 +1114,6 @@ static int mid_setup_dma(struct pci_dev *pdev) | |||
1114 | 1114 | ||
1115 | midch->chan.device = &dma->common; | 1115 | midch->chan.device = &dma->common; |
1116 | midch->chan.cookie = 1; | 1116 | midch->chan.cookie = 1; |
1117 | midch->chan.chan_id = i; | ||
1118 | midch->ch_id = dma->chan_base + i; | 1117 | midch->ch_id = dma->chan_base + i; |
1119 | pr_debug("MDMA:Init CH %d, ID %d\n", i, midch->ch_id); | 1118 | pr_debug("MDMA:Init CH %d, ID %d\n", i, midch->ch_id); |
1120 | 1119 | ||
@@ -1150,7 +1149,6 @@ static int mid_setup_dma(struct pci_dev *pdev) | |||
1150 | dma_cap_set(DMA_SLAVE, dma->common.cap_mask); | 1149 | dma_cap_set(DMA_SLAVE, dma->common.cap_mask); |
1151 | dma_cap_set(DMA_PRIVATE, dma->common.cap_mask); | 1150 | dma_cap_set(DMA_PRIVATE, dma->common.cap_mask); |
1152 | dma->common.dev = &pdev->dev; | 1151 | dma->common.dev = &pdev->dev; |
1153 | dma->common.chancnt = dma->max_chan; | ||
1154 | 1152 | ||
1155 | dma->common.device_alloc_chan_resources = | 1153 | dma->common.device_alloc_chan_resources = |
1156 | intel_mid_dma_alloc_chan_resources; | 1154 | intel_mid_dma_alloc_chan_resources; |
diff --git a/drivers/dma/mpc512x_dma.c b/drivers/dma/mpc512x_dma.c index b9bae94f2015..8ba4edc6185e 100644 --- a/drivers/dma/mpc512x_dma.c +++ b/drivers/dma/mpc512x_dma.c | |||
@@ -741,7 +741,6 @@ static int __devinit mpc_dma_probe(struct platform_device *op) | |||
741 | mchan = &mdma->channels[i]; | 741 | mchan = &mdma->channels[i]; |
742 | 742 | ||
743 | mchan->chan.device = dma; | 743 | mchan->chan.device = dma; |
744 | mchan->chan.chan_id = i; | ||
745 | mchan->chan.cookie = 1; | 744 | mchan->chan.cookie = 1; |
746 | mchan->completed_cookie = mchan->chan.cookie; | 745 | mchan->completed_cookie = mchan->chan.cookie; |
747 | 746 | ||
diff --git a/drivers/dma/pch_dma.c b/drivers/dma/pch_dma.c index 1ac8d4b580b7..5b65362024fd 100644 --- a/drivers/dma/pch_dma.c +++ b/drivers/dma/pch_dma.c | |||
@@ -926,7 +926,6 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev, | |||
926 | } | 926 | } |
927 | 927 | ||
928 | pd->dma.dev = &pdev->dev; | 928 | pd->dma.dev = &pdev->dev; |
929 | pd->dma.chancnt = nr_channels; | ||
930 | 929 | ||
931 | INIT_LIST_HEAD(&pd->dma.channels); | 930 | INIT_LIST_HEAD(&pd->dma.channels); |
932 | 931 | ||
@@ -935,7 +934,6 @@ static int __devinit pch_dma_probe(struct pci_dev *pdev, | |||
935 | 934 | ||
936 | pd_chan->chan.device = &pd->dma; | 935 | pd_chan->chan.device = &pd->dma; |
937 | pd_chan->chan.cookie = 1; | 936 | pd_chan->chan.cookie = 1; |
938 | pd_chan->chan.chan_id = i; | ||
939 | 937 | ||
940 | pd_chan->membase = ®s->desc[i]; | 938 | pd_chan->membase = ®s->desc[i]; |
941 | 939 | ||
diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c index 00eee59e8b33..7f86e7df7da1 100644 --- a/drivers/dma/pl330.c +++ b/drivers/dma/pl330.c | |||
@@ -747,11 +747,9 @@ pl330_probe(struct amba_device *adev, const struct amba_id *id) | |||
747 | spin_lock_init(&pch->lock); | 747 | spin_lock_init(&pch->lock); |
748 | pch->pl330_chid = NULL; | 748 | pch->pl330_chid = NULL; |
749 | pch->chan.device = pd; | 749 | pch->chan.device = pd; |
750 | pch->chan.chan_id = i; | ||
751 | pch->dmac = pdmac; | 750 | pch->dmac = pdmac; |
752 | 751 | ||
753 | /* Add the channel to the DMAC list */ | 752 | /* Add the channel to the DMAC list */ |
754 | pd->chancnt++; | ||
755 | list_add_tail(&pch->chan.device_node, &pd->channels); | 753 | list_add_tail(&pch->chan.device_node, &pd->channels); |
756 | } | 754 | } |
757 | 755 | ||
diff --git a/drivers/dma/timb_dma.c b/drivers/dma/timb_dma.c index f69f90a61873..6dbdf451128e 100644 --- a/drivers/dma/timb_dma.c +++ b/drivers/dma/timb_dma.c | |||
@@ -753,7 +753,7 @@ static int __devinit td_probe(struct platform_device *pdev) | |||
753 | 753 | ||
754 | INIT_LIST_HEAD(&td->dma.channels); | 754 | INIT_LIST_HEAD(&td->dma.channels); |
755 | 755 | ||
756 | for (i = 0; i < pdata->nr_channels; i++, td->dma.chancnt++) { | 756 | for (i = 0; i < pdata->nr_channels; i++) { |
757 | struct timb_dma_chan *td_chan = &td->channels[i]; | 757 | struct timb_dma_chan *td_chan = &td->channels[i]; |
758 | struct timb_dma_platform_data_channel *pchan = | 758 | struct timb_dma_platform_data_channel *pchan = |
759 | pdata->channels + i; | 759 | pdata->channels + i; |
@@ -767,7 +767,6 @@ static int __devinit td_probe(struct platform_device *pdev) | |||
767 | 767 | ||
768 | td_chan->chan.device = &td->dma; | 768 | td_chan->chan.device = &td->dma; |
769 | td_chan->chan.cookie = 1; | 769 | td_chan->chan.cookie = 1; |
770 | td_chan->chan.chan_id = i; | ||
771 | spin_lock_init(&td_chan->lock); | 770 | spin_lock_init(&td_chan->lock); |
772 | INIT_LIST_HEAD(&td_chan->active_list); | 771 | INIT_LIST_HEAD(&td_chan->active_list); |
773 | INIT_LIST_HEAD(&td_chan->queue); | 772 | INIT_LIST_HEAD(&td_chan->queue); |