Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b89f3b94 authored by Malcolm Priestley's avatar Malcolm Priestley Committed by Greg Kroah-Hartman
Browse files

staging: vt6656: clean up s_vGetFreeContext



Camel case clean up
pDevice -> priv
pContext -> context

Signed-off-by: default avatarMalcolm Priestley <tvboxspy@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5c851383
Loading
Loading
Loading
Loading
+19 −18
Original line number Original line Diff line number Diff line
@@ -96,8 +96,7 @@ static const u16 wFB_Opt1[2][5] = {
static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
static void s_vSaveTxPktInfo(struct vnt_private *pDevice, u8 byPktNum,
	u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl);
	u8 *pbyDestAddr, u16 wPktLength, u16 wFIFOCtl);


static struct vnt_usb_send_context
static struct vnt_usb_send_context *s_vGetFreeContext(struct vnt_private *);
		*s_vGetFreeContext(struct vnt_private *pDevice);


static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
static u16 s_vGenerateTxParameter(struct vnt_private *pDevice,
	u8 byPktType, u16 wCurrentRate,	struct vnt_tx_buffer *tx_buffer,
	u8 byPktType, u16 wCurrentRate,	struct vnt_tx_buffer *tx_buffer,
@@ -138,26 +137,28 @@ static u16 s_uGetRTSCTSDuration(struct vnt_private *pDevice,
	int bNeedAck, u8 byFBOption);
	int bNeedAck, u8 byFBOption);


static struct vnt_usb_send_context
static struct vnt_usb_send_context
	*s_vGetFreeContext(struct vnt_private *pDevice)
	*s_vGetFreeContext(struct vnt_private *priv)
{
{
	struct vnt_usb_send_context *pContext = NULL;
	struct vnt_usb_send_context *context = NULL;
	int ii;
	int ii;


	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"GetFreeContext()\n");


    for (ii = 0; ii < pDevice->cbTD; ii++) {
	for (ii = 0; ii < priv->cbTD; ii++) {
	if (!pDevice->apTD[ii])
		if (!priv->apTD[ii])
			return NULL;
			return NULL;
        pContext = pDevice->apTD[ii];

        if (pContext->bBoolInUse == false) {
		context = priv->apTD[ii];
            pContext->bBoolInUse = true;
		if (context->bBoolInUse == false) {
		memset(pContext->Data, 0, MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
			context->bBoolInUse = true;
		return pContext;
			memset(context->Data, 0,
					MAX_TOTAL_SIZE_WITH_ALL_HEADERS);
			return context;
		}
		}
	}
	}
    if ( ii == pDevice->cbTD ) {

	if (ii == priv->cbTD)
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Free Tx Context\n");
		DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO"No Free Tx Context\n");
    }


	return NULL;
	return NULL;
}
}