]> git.ipfire.org Git - people/ms/linux.git/blobdiff - drivers/net/ethernet/amd/xgbe/xgbe-desc.c
Importing "grsecurity-3.1-3.19.2-201503201903.patch"
[people/ms/linux.git] / drivers / net / ethernet / amd / xgbe / xgbe-desc.c
index a50891f521978ff67d55959fbfab1b63da762f4c..b26fe24076ece36c92f576b1842e6287cf48b0ec 100644 (file)
@@ -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,
+};