diff options
author | Maxime Ripard <maxime.ripard@free-electrons.com> | 2014-10-16 05:01:00 -0400 |
---|---|---|
committer | Vinod Koul <vinod.koul@intel.com> | 2014-11-06 01:02:45 -0500 |
commit | 9aa7171157ef452517056e1368459d6f5b4636aa (patch) | |
tree | b1c7a1254f6e8889e811abf0371467ad349bac4f /drivers/dma | |
parent | 8c81bfbdb2bc52185500f6b16c14e56c0bb779fb (diff) |
dmaengine: sa11x0: Remove chancnt affectations
chanctnt is already filled by dma_async_device_register, which uses the channel
list to know how much channels there is.
Since it's already filled, we can safely remove it from the drivers' probe
function.
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
Diffstat (limited to 'drivers/dma')
-rw-r--r-- | drivers/dma/sa11x0-dma.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/dma/sa11x0-dma.c b/drivers/dma/sa11x0-dma.c index 4b0ef043729a..2329d295efb5 100644 --- a/drivers/dma/sa11x0-dma.c +++ b/drivers/dma/sa11x0-dma.c | |||
@@ -829,7 +829,6 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev, | |||
829 | { | 829 | { |
830 | unsigned i; | 830 | unsigned i; |
831 | 831 | ||
832 | dmadev->chancnt = ARRAY_SIZE(chan_desc); | ||
833 | INIT_LIST_HEAD(&dmadev->channels); | 832 | INIT_LIST_HEAD(&dmadev->channels); |
834 | dmadev->dev = dev; | 833 | dmadev->dev = dev; |
835 | dmadev->device_alloc_chan_resources = sa11x0_dma_alloc_chan_resources; | 834 | dmadev->device_alloc_chan_resources = sa11x0_dma_alloc_chan_resources; |
@@ -838,7 +837,7 @@ static int sa11x0_dma_init_dmadev(struct dma_device *dmadev, | |||
838 | dmadev->device_tx_status = sa11x0_dma_tx_status; | 837 | dmadev->device_tx_status = sa11x0_dma_tx_status; |
839 | dmadev->device_issue_pending = sa11x0_dma_issue_pending; | 838 | dmadev->device_issue_pending = sa11x0_dma_issue_pending; |
840 | 839 | ||
841 | for (i = 0; i < dmadev->chancnt; i++) { | 840 | for (i = 0; i < ARRAY_SIZE(chan_desc); i++) { |
842 | struct sa11x0_dma_chan *c; | 841 | struct sa11x0_dma_chan *c; |
843 | 842 | ||
844 | c = kzalloc(sizeof(*c), GFP_KERNEL); | 843 | c = kzalloc(sizeof(*c), GFP_KERNEL); |