Staging: bcm: nvm.c: replaced member accessing with variable
Signed-off-by: Matthias Beyer <mail@beyermatthias.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
aabaf67f6f
commit
ae5ad41993
1 changed files with 5 additions and 3 deletions
|
@ -1042,6 +1042,8 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,
|
|||
{
|
||||
unsigned int j;
|
||||
int bulk_read_stat;
|
||||
FP_FLASH_WRITE_STATUS writef =
|
||||
ad->fpFlashWriteWithStatusCheck;
|
||||
|
||||
for (i = 0; i < ad->uiSectorSize; i += MAX_RW_SIZE) {
|
||||
bulk_read_stat = BeceemFlashBulkRead(ad,
|
||||
|
@ -1054,14 +1056,14 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,
|
|||
|
||||
if (ad->ulFlashWriteSize == 1) {
|
||||
for (j = 0; j < 16; j++) {
|
||||
if ((read_bk[j] != tmpbuff[i+j]) &&
|
||||
(STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i + j, &tmpbuff[i+j]))) {
|
||||
if ((read_bk[j] != tmpbuff[i + j]) &&
|
||||
(STATUS_SUCCESS != (*writef)(ad, partoff + i + j, &tmpbuff[i + j]))) {
|
||||
return STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if ((memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) &&
|
||||
((STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i, &tmpbuff[i])))) {
|
||||
(STATUS_SUCCESS != (*writef)(ad, partoff + i, &tmpbuff[i]))) {
|
||||
return STATUS_FAILURE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue