mirror of https://gitee.com/openkylin/linux.git
Staging: bcm: Remove typedef for _NVM_READWRITE and call directly.
This patch removes typedef for _NVM_READWRITE, and changes the name of the struct to bcm_nvm_readwrite. In addition, any calls to typedefs NVM_READWRITE, or *PNVM_READWRITE are changed to call the struct directly. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
98e341d3dd
commit
3712af0c0d
|
@ -1262,7 +1262,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
||||||
|
|
||||||
case IOCTL_BCM_NVM_READ:
|
case IOCTL_BCM_NVM_READ:
|
||||||
case IOCTL_BCM_NVM_WRITE: {
|
case IOCTL_BCM_NVM_WRITE: {
|
||||||
NVM_READWRITE stNVMReadWrite;
|
struct bcm_nvm_readwrite stNVMReadWrite;
|
||||||
PUCHAR pReadData = NULL;
|
PUCHAR pReadData = NULL;
|
||||||
ULONG ulDSDMagicNumInUsrBuff = 0;
|
ULONG ulDSDMagicNumInUsrBuff = 0;
|
||||||
struct timeval tv0, tv1;
|
struct timeval tv0, tv1;
|
||||||
|
@ -1289,7 +1289,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
||||||
|
|
||||||
if (copy_from_user(&stNVMReadWrite,
|
if (copy_from_user(&stNVMReadWrite,
|
||||||
(IOCTL_BCM_NVM_READ == cmd) ? IoBuffer.OutputBuffer : IoBuffer.InputBuffer,
|
(IOCTL_BCM_NVM_READ == cmd) ? IoBuffer.OutputBuffer : IoBuffer.InputBuffer,
|
||||||
sizeof(NVM_READWRITE)))
|
sizeof(struct bcm_nvm_readwrite)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1842,7 +1842,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case IOCTL_BCM_NVM_RAW_READ: {
|
case IOCTL_BCM_NVM_RAW_READ: {
|
||||||
NVM_READWRITE stNVMRead;
|
struct bcm_nvm_readwrite stNVMRead;
|
||||||
INT NOB ;
|
INT NOB ;
|
||||||
INT BuffSize ;
|
INT BuffSize ;
|
||||||
INT ReadOffset = 0;
|
INT ReadOffset = 0;
|
||||||
|
@ -1861,7 +1861,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg)
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (copy_from_user(&stNVMRead, IoBuffer.OutputBuffer, sizeof(NVM_READWRITE)))
|
if (copy_from_user(&stNVMRead, IoBuffer.OutputBuffer, sizeof(struct bcm_nvm_readwrite)))
|
||||||
return -EFAULT;
|
return -EFAULT;
|
||||||
|
|
||||||
NOB = stNVMRead.uiNumBytes;
|
NOB = stNVMRead.uiNumBytes;
|
||||||
|
|
|
@ -116,12 +116,12 @@ typedef struct _DEVICE_DRIVER_INFO {
|
||||||
unsigned int u32Reserved[10];
|
unsigned int u32Reserved[10];
|
||||||
} DEVICE_DRIVER_INFO;
|
} DEVICE_DRIVER_INFO;
|
||||||
|
|
||||||
typedef struct _NVM_READWRITE {
|
struct bcm_nvm_readwrite {
|
||||||
void __user *pBuffer;
|
void __user *pBuffer;
|
||||||
uint32_t uiOffset;
|
uint32_t uiOffset;
|
||||||
uint32_t uiNumBytes;
|
uint32_t uiNumBytes;
|
||||||
bool bVerify;
|
bool bVerify;
|
||||||
} NVM_READWRITE, *PNVM_READWRITE;
|
};
|
||||||
|
|
||||||
struct bcm_bulk_wrm_buffer {
|
struct bcm_bulk_wrm_buffer {
|
||||||
unsigned long Register;
|
unsigned long Register;
|
||||||
|
|
Loading…
Reference in New Issue