[PATCH 3/6] net: designware: use dma_alloc for descriptors

Sascha Hauer s.hauer at pengutronix.de
Mon Sep 9 10:53:18 EDT 2013


Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
---
 drivers/net/designware.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 45de31c..33d7345 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -418,8 +418,8 @@ static int dwc_ether_probe(struct device_d *dev)
 		CONFIG_TX_DESCR_NUM * sizeof(struct dmamacdescr));
 	priv->rx_mac_descrtable = dma_alloc_coherent(
 		CONFIG_RX_DESCR_NUM * sizeof(struct dmamacdescr));
-	priv->txbuffs = malloc(TX_TOTAL_BUFSIZE);
-	priv->rxbuffs = malloc(RX_TOTAL_BUFSIZE);
+	priv->txbuffs = dma_alloc(TX_TOTAL_BUFSIZE);
+	priv->rxbuffs = dma_alloc(RX_TOTAL_BUFSIZE);
 	priv->fix_mac_speed = pdata->fix_mac_speed;
 
 	edev = &priv->netdev;
-- 
1.8.4.rc3




More information about the barebox mailing list