X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=drivers%2Fnet%2Fethernet%2Famd%2Fxgbe%2Fxgbe-desc.c;h=b26fe24076ece36c92f576b1842e6287cf48b0ec;hb=63d9c273d7fae69ca6908d2668af0e508b99ea91;hp=a50891f521978ff67d55959fbfab1b63da762f4c;hpb=660613d1a4e94144490850b6c3d350331860fac4;p=people%2Fms%2Flinux.git diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c index a50891f52197..b26fe24076ec 100644 --- a/drivers/net/ethernet/amd/xgbe/xgbe-desc.c +++ b/drivers/net/ethernet/amd/xgbe/xgbe-desc.c @@ -347,7 +347,7 @@ static int xgbe_map_rx_buffer(struct xgbe_prv_data *pdata, static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata) { - struct xgbe_hw_if *hw_if = &pdata->hw_if; + struct xgbe_hw_if *hw_if = pdata->hw_if; struct xgbe_channel *channel; struct xgbe_ring *ring; struct xgbe_ring_data *rdata; @@ -388,7 +388,7 @@ static void xgbe_wrapper_tx_descriptor_init(struct xgbe_prv_data *pdata) static void xgbe_wrapper_rx_descriptor_init(struct xgbe_prv_data *pdata) { - struct xgbe_hw_if *hw_if = &pdata->hw_if; + struct xgbe_hw_if *hw_if = pdata->hw_if; struct xgbe_channel *channel; struct xgbe_ring *ring; struct xgbe_ring_desc *rdesc; @@ -624,7 +624,7 @@ err_out: static void xgbe_realloc_rx_buffer(struct xgbe_channel *channel) { struct xgbe_prv_data *pdata = channel->pdata; - struct xgbe_hw_if *hw_if = &pdata->hw_if; + struct xgbe_hw_if *hw_if = pdata->hw_if; struct xgbe_ring *ring = channel->rx_ring; struct xgbe_ring_data *rdata; int i; @@ -650,17 +650,12 @@ static void xgbe_realloc_rx_buffer(struct xgbe_channel *channel) DBGPR("<--xgbe_realloc_rx_buffer\n"); } -void xgbe_init_function_ptrs_desc(struct xgbe_desc_if *desc_if) -{ - DBGPR("-->xgbe_init_function_ptrs_desc\n"); - - desc_if->alloc_ring_resources = xgbe_alloc_ring_resources; - desc_if->free_ring_resources = xgbe_free_ring_resources; - desc_if->map_tx_skb = xgbe_map_tx_skb; - desc_if->realloc_rx_buffer = xgbe_realloc_rx_buffer; - desc_if->unmap_rdata = xgbe_unmap_rdata; - desc_if->wrapper_tx_desc_init = xgbe_wrapper_tx_descriptor_init; - desc_if->wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init; - - DBGPR("<--xgbe_init_function_ptrs_desc\n"); -} +const struct xgbe_desc_if default_xgbe_desc_if = { + .alloc_ring_resources = xgbe_alloc_ring_resources, + .free_ring_resources = xgbe_free_ring_resources, + .map_tx_skb = xgbe_map_tx_skb, + .realloc_rx_buffer = xgbe_realloc_rx_buffer, + .unmap_rdata = xgbe_unmap_rdata, + .wrapper_tx_desc_init = xgbe_wrapper_tx_descriptor_init, + .wrapper_rx_desc_init = xgbe_wrapper_rx_descriptor_init, +};