aboutsummaryrefslogtreecommitdiff
path: root/drivers/staging/et131x
diff options
context:
space:
mode:
authorAlan Cox <alan@linux.intel.com>2009-10-06 15:49:13 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2009-12-11 12:23:07 -0800
commitf432c55e14e3eae2258c0f222b8631255bcc0031 (patch)
tree58596c757f8edf5251abc14f57007888ccb15f94 /drivers/staging/et131x
parent7f59b1bfa3149c81b332a8c2c3935111d97a5b20 (diff)
Staging: et131x: fold up simple wrapper functions
Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/et131x')
-rw-r--r--drivers/staging/et131x/et1310_rx.c39
1 files changed, 5 insertions, 34 deletions
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index f8fee252a94..c6097b25f8b 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -417,14 +417,16 @@ void et131x_rx_dma_memory_free(struct et131x_adapter *adapter)
MP_RFD, list_node);
list_del(&rfd->list_node);
- et131x_rfd_resources_free(adapter, rfd);
+ rfd->Packet = NULL;
+ kmem_cache_free(adapter->RxRing.RecvLookaside, rfd);
}
while (!list_empty(&rx_ring->RecvPendingList)) {
rfd = (MP_RFD *) list_entry(rx_ring->RecvPendingList.next,
MP_RFD, list_node);
list_del(&rfd->list_node);
- et131x_rfd_resources_free(adapter, rfd);
+ rfd->Packet = NULL;
+ kmem_cache_free(adapter->RxRing.RecvLookaside, rfd);
}
/* Free Free Buffer Ring 1 */
@@ -572,13 +574,7 @@ int et131x_init_recv(struct et131x_adapter *adapter)
continue;
}
- status = et131x_rfd_resources_alloc(adapter, rfd);
- if (status != 0) {
- dev_err(&adapter->pdev->dev,
- "Couldn't alloc packet for RFD\n");
- kmem_cache_free(rx_ring->RecvLookaside, rfd);
- continue;
- }
+ rfd->Packet = NULL;
/* Add this RFD to the RecvList */
list_add_tail(&rfd->list_node, &rx_ring->RecvList);
@@ -602,31 +598,6 @@ int et131x_init_recv(struct et131x_adapter *adapter)
}
/**
- * et131x_rfd_resources_alloc
- * @adapter: pointer to our private adapter structure
- * @rfd: pointer to a RFD
- *
- * Returns 0 on success and errno on failure (as defined in errno.h)
- */
-int et131x_rfd_resources_alloc(struct et131x_adapter *adapter, MP_RFD *rfd)
-{
- rfd->Packet = NULL;
-
- return 0;
-}
-
-/**
- * et131x_rfd_resources_free - Free the packet allocated for the given RFD
- * @adapter: pointer to our private adapter structure
- * @rfd: pointer to a RFD
- */
-void et131x_rfd_resources_free(struct et131x_adapter *adapter, MP_RFD *rfd)
-{
- rfd->Packet = NULL;
- kmem_cache_free(adapter->RxRing.RecvLookaside, rfd);
-}
-
-/**
* ConfigRxDmaRegs - Start of Rx_DMA init sequence
* @etdev: pointer to our adapter structure
*/