diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2015-08-10 12:26:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-12 14:31:07 -0700 |
commit | c3ffe0ca4a75ec1b5183e6141bed4dfcde4309fb (patch) | |
tree | 2198448532baa8510429fb8abb1a40f630add7b2 /drivers/net/ethernet/altera/altera_sgdma.c | |
parent | adc6310ca49e2c007e1a86ff11a4c215687116d4 (diff) | |
download | op-kernel-dev-c3ffe0ca4a75ec1b5183e6141bed4dfcde4309fb.zip op-kernel-dev-c3ffe0ca4a75ec1b5183e6141bed4dfcde4309fb.tar.gz |
net: eth: altera: Remove sgdmadesclen member from altera_tse_private
altera_tse_private->sgdmadesclen is always assigned assigned the same
value and never changes during runtime. Remove the struct member and
use a new define for sizeof(struct sgdma_descrip) instead.
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/altera/altera_sgdma.c')
-rw-r--r-- | drivers/net/ethernet/altera/altera_sgdma.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/ethernet/altera/altera_sgdma.c b/drivers/net/ethernet/altera/altera_sgdma.c index 580553d..88ef67a 100644 --- a/drivers/net/ethernet/altera/altera_sgdma.c +++ b/drivers/net/ethernet/altera/altera_sgdma.c @@ -71,8 +71,6 @@ int sgdma_initialize(struct altera_tse_private *priv) SGDMA_CTRLREG_INTEN | SGDMA_CTRLREG_ILASTD; - priv->sgdmadesclen = sizeof(struct sgdma_descrip); - INIT_LIST_HEAD(&priv->txlisthd); INIT_LIST_HEAD(&priv->rxlisthd); @@ -254,7 +252,7 @@ u32 sgdma_rx_status(struct altera_tse_private *priv) unsigned int pktstatus = 0; dma_sync_single_for_cpu(priv->device, priv->rxdescphys, - priv->sgdmadesclen, + SGDMA_DESC_LEN, DMA_FROM_DEVICE); pktlength = csrrd16(desc, sgdma_descroffs(bytes_xferred)); @@ -374,7 +372,7 @@ static int sgdma_async_read(struct altera_tse_private *priv) dma_sync_single_for_device(priv->device, priv->rxdescphys, - priv->sgdmadesclen, + SGDMA_DESC_LEN, DMA_TO_DEVICE); csrwr32(lower_32_bits(sgdma_rxphysaddr(priv, cdesc)), @@ -402,7 +400,7 @@ static int sgdma_async_write(struct altera_tse_private *priv, csrwr32(0x1f, priv->tx_dma_csr, sgdma_csroffs(status)); dma_sync_single_for_device(priv->device, priv->txdescphys, - priv->sgdmadesclen, DMA_TO_DEVICE); + SGDMA_DESC_LEN, DMA_TO_DEVICE); csrwr32(lower_32_bits(sgdma_txphysaddr(priv, desc)), priv->tx_dma_csr, |