aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Beyer2014-07-20 15:14:13 +0200
committerGreg Kroah-Hartman2014-07-21 12:30:42 -0700
commitae5ad41993eb5b7a40b077fc1b4762481fcd3a3e (patch)
treec861a6a66260a6933d651a7d01d47be35f9f636e
parentaabaf67f6f7417da74aa3b25edf3c647a12f3b9d (diff)
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>
-rw-r--r--drivers/staging/bcm/nvm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index c38c80347c19..0d197c0855db 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -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;
}
}