]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commitdiff
Staging: bcm: nvm.c: replaced member accessing with variable
authorMatthias Beyer <mail@beyermatthias.de>
Sun, 20 Jul 2014 13:14:13 +0000 (15:14 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 21 Jul 2014 19:30:42 +0000 (12:30 -0700)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/bcm/nvm.c

index c38c80347c1985557da2d0990a385c02edf525e8..0d197c0855db7588ccb11bc790684e0dda316bc0 100644 (file)
@@ -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;
                        }
                }