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

Commit e17219af authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman
Browse files

Staging: bcm: Bcmchar.c: Renamed variable "pReadData" -> "read_data"



Renamed variable "pReadData" -> "read_data" in

    bcm_handle_nvm_read_cmd()
    handle_flash2x_adapter()

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5a7add1c
Loading
Loading
Loading
Loading
+10 −10
Original line number Original line Diff line number Diff line
@@ -3,7 +3,7 @@
#include "headers.h"
#include "headers.h"


static int bcm_handle_nvm_read_cmd(struct bcm_mini_adapter *ad,
static int bcm_handle_nvm_read_cmd(struct bcm_mini_adapter *ad,
				   PUCHAR pReadData,
				   PUCHAR read_data,
				   struct bcm_nvm_readwrite *stNVMReadWrite)
				   struct bcm_nvm_readwrite *stNVMReadWrite)
{
{
	INT Status = STATUS_FAILURE;
	INT Status = STATUS_FAILURE;
@@ -17,23 +17,23 @@ static int bcm_handle_nvm_read_cmd(struct bcm_mini_adapter *ad,
			DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
			DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
			"Device is in Idle/Shutdown Mode\n");
			"Device is in Idle/Shutdown Mode\n");
		up(&ad->NVMRdmWrmLock);
		up(&ad->NVMRdmWrmLock);
		kfree(pReadData);
		kfree(read_data);
		return -EACCES;
		return -EACCES;
	}
	}


	Status = BeceemNVMRead(ad, (PUINT)pReadData,
	Status = BeceemNVMRead(ad, (PUINT)read_data,
			       stNVMReadWrite->uiOffset,
			       stNVMReadWrite->uiOffset,
			       stNVMReadWrite->uiNumBytes);
			       stNVMReadWrite->uiNumBytes);
	up(&ad->NVMRdmWrmLock);
	up(&ad->NVMRdmWrmLock);


	if (Status != STATUS_SUCCESS) {
	if (Status != STATUS_SUCCESS) {
		kfree(pReadData);
		kfree(read_data);
		return Status;
		return Status;
	}
	}


	if (copy_to_user(stNVMReadWrite->pBuffer, pReadData,
	if (copy_to_user(stNVMReadWrite->pBuffer, read_data,
			stNVMReadWrite->uiNumBytes)) {
			stNVMReadWrite->uiNumBytes)) {
		kfree(pReadData);
		kfree(read_data);
		return -EFAULT;
		return -EFAULT;
	}
	}


@@ -41,7 +41,7 @@ static int bcm_handle_nvm_read_cmd(struct bcm_mini_adapter *ad,
}
}


static int handle_flash2x_adapter(struct bcm_mini_adapter *ad,
static int handle_flash2x_adapter(struct bcm_mini_adapter *ad,
				  PUCHAR pReadData,
				  PUCHAR read_data,
				  struct bcm_nvm_readwrite *stNVMReadWrite)
				  struct bcm_nvm_readwrite *stNVMReadWrite)
{
{
	/*
	/*
@@ -73,18 +73,18 @@ static int handle_flash2x_adapter(struct bcm_mini_adapter *ad,
		BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
		BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
				"DSD Sig is present neither in Flash nor User provided Input..");
				"DSD Sig is present neither in Flash nor User provided Input..");
		up(&ad->NVMRdmWrmLock);
		up(&ad->NVMRdmWrmLock);
		kfree(pReadData);
		kfree(read_data);
		return Status;
		return Status;
	}
	}


	ulDSDMagicNumInUsrBuff =
	ulDSDMagicNumInUsrBuff =
		ntohl(*(PUINT)(pReadData + stNVMReadWrite->uiNumBytes -
		ntohl(*(PUINT)(read_data + stNVMReadWrite->uiNumBytes -
		      SIGNATURE_SIZE));
		      SIGNATURE_SIZE));
	if (ulDSDMagicNumInUsrBuff != DSD_IMAGE_MAGIC_NUMBER) {
	if (ulDSDMagicNumInUsrBuff != DSD_IMAGE_MAGIC_NUMBER) {
		BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
		BCM_DEBUG_PRINT(ad, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL,
				"DSD Sig is present neither in Flash nor User provided Input..");
				"DSD Sig is present neither in Flash nor User provided Input..");
		up(&ad->NVMRdmWrmLock);
		up(&ad->NVMRdmWrmLock);
		kfree(pReadData);
		kfree(read_data);
		return Status;
		return Status;
	}
	}