net: ethernet: ti: davinci_cpdma: move cpdma channel struct macroses to internals

Keep the driver internals in C file. Currently it's not required for
drivers to know rx or tx a channel is, except create function.
So correct "channel create" function, and use all channel struct
macroses only for internal use.

Reviewed-by: Mugunthan V N <mugunthanvnm@ti.com>
Signed-off-by: Ivan Khoronzhuk <ivan.khoronzhuk@linaro.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Ivan Khoronzhuk
2016-08-22 21:18:27 +03:00
committed by David S. Miller
parent e05107e6b7
commit 925d65e6d8
4 changed files with 18 additions and 19 deletions

View File

@@ -2535,11 +2535,8 @@ static int cpsw_probe(struct platform_device *pdev)
goto clean_runtime_disable_ret;
}
cpsw->txch[0] = cpdma_chan_create(cpsw->dma, tx_chan_num(0),
cpsw_tx_handler);
cpsw->rxch[0] = cpdma_chan_create(cpsw->dma, rx_chan_num(0),
cpsw_rx_handler);
cpsw->txch[0] = cpdma_chan_create(cpsw->dma, 0, cpsw_tx_handler, 0);
cpsw->rxch[0] = cpdma_chan_create(cpsw->dma, 0, cpsw_rx_handler, 1);
if (WARN_ON(!cpsw->rxch[0] || !cpsw->txch[0])) {
dev_err(priv->dev, "error initializing dma channels\n");
ret = -ENOMEM;