Commit ae5ad419 authored by Matthias Beyer's avatar Matthias Beyer Committed by Greg Kroah-Hartman

Staging: bcm: nvm.c: replaced member accessing with variable

Signed-off-by: default avatarMatthias Beyer <mail@beyermatthias.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent aabaf67f
...@@ -1042,6 +1042,8 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad, ...@@ -1042,6 +1042,8 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,
{ {
unsigned int j; unsigned int j;
int bulk_read_stat; int bulk_read_stat;
FP_FLASH_WRITE_STATUS writef =
ad->fpFlashWriteWithStatusCheck;
for (i = 0; i < ad->uiSectorSize; i += MAX_RW_SIZE) { for (i = 0; i < ad->uiSectorSize; i += MAX_RW_SIZE) {
bulk_read_stat = BeceemFlashBulkRead(ad, bulk_read_stat = BeceemFlashBulkRead(ad,
...@@ -1054,14 +1056,14 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad, ...@@ -1054,14 +1056,14 @@ static int bulk_read_complete_sector(struct bcm_mini_adapter *ad,
if (ad->ulFlashWriteSize == 1) { if (ad->ulFlashWriteSize == 1) {
for (j = 0; j < 16; j++) { for (j = 0; j < 16; j++) {
if ((read_bk[j] != tmpbuff[i+j]) && if ((read_bk[j] != tmpbuff[i + j]) &&
(STATUS_SUCCESS != (*ad->fpFlashWriteWithStatusCheck)(ad, partoff + i + j, &tmpbuff[i+j]))) { (STATUS_SUCCESS != (*writef)(ad, partoff + i + j, &tmpbuff[i + j]))) {
return STATUS_FAILURE; return STATUS_FAILURE;
} }
} }
} else { } else {
if ((memcmp(read_bk, &tmpbuff[i], MAX_RW_SIZE)) && 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; return STATUS_FAILURE;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment