summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorKevin McKinney <klmckinney1@gmail.com>2012-06-19 20:14:55 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-06-20 16:09:43 -0700
commit85ba24d395620d8a0769bdaa619b32c458603180 (patch)
tree925cdcf19f66a5760a4d832bab4ace8e695dd865 /drivers
parenta2a7ef06de037761dab79e1ed8e62758ddac3201 (diff)
downloadop-kernel-dev-85ba24d395620d8a0769bdaa619b32c458603180.zip
op-kernel-dev-85ba24d395620d8a0769bdaa619b32c458603180.tar.gz
Staging: bcm: Change order in if conditions to make more readable in nvm.c
This patch changes the order of several if conditions to make the code more readable. Signed-off-by: Kevin McKinney <klmckinney1@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/bcm/nvm.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/staging/bcm/nvm.c b/drivers/staging/bcm/nvm.c
index a85258f..b179dba 100644
--- a/drivers/staging/bcm/nvm.c
+++ b/drivers/staging/bcm/nvm.c
@@ -339,7 +339,7 @@ int BeceemEEPROMBulkRead(struct bcm_mini_adapter *Adapter,
* read function to make the access faster.
* We read 4 Dwords of data
*/
- if (0 == ReadBeceemEEPROMBulk(Adapter, uiOffset, &uiData[0], 4)) {
+ if (ReadBeceemEEPROMBulk(Adapter, uiOffset, &uiData[0], 4) == 0) {
memcpy(pcBuff + uiIndex, &uiData[0], MAX_RW_SIZE);
uiOffset += MAX_RW_SIZE;
uiBytesRemaining -= MAX_RW_SIZE;
@@ -349,7 +349,7 @@ int BeceemEEPROMBulkRead(struct bcm_mini_adapter *Adapter,
mdelay(3); /* sleep for a while before retry... */
}
} else if (uiBytesRemaining >= 4) {
- if (0 == ReadBeceemEEPROM(Adapter, uiOffset, &uiData[0])) {
+ if (ReadBeceemEEPROM(Adapter, uiOffset, &uiData[0]) == 0) {
memcpy(pcBuff + uiIndex, &uiData[0], 4);
uiOffset += 4;
uiBytesRemaining -= 4;
@@ -362,7 +362,7 @@ int BeceemEEPROMBulkRead(struct bcm_mini_adapter *Adapter,
/* Handle the reads less than 4 bytes... */
PUCHAR pCharBuff = (PUCHAR)pBuffer;
pCharBuff += uiIndex;
- if (0 == ReadBeceemEEPROM(Adapter, uiOffset, &uiData[0])) {
+ if (ReadBeceemEEPROM(Adapter, uiOffset, &uiData[0]) == 0) {
memcpy(pCharBuff, &uiData[0], uiBytesRemaining); /* copy only bytes requested. */
uiBytesRemaining = 0;
} else {
@@ -515,7 +515,7 @@ static unsigned int BcmGetEEPROMSize(struct bcm_mini_adapter *Adapter)
* EEPROM may not be present or not programmed
*/
uiData = 0xBABEFACE;
- if (0 == BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&uiData, 0, 4, TRUE)) {
+ if (BeceemEEPROMBulkWrite(Adapter, (PUCHAR)&uiData, 0, 4, TRUE) == 0) {
uiData = 0;
for (uiIndex = 2; uiIndex <= 256; uiIndex *= 2) {
BeceemEEPROMBulkRead(Adapter, &uiData, uiIndex * 1024, 4);
OpenPOWER on IntegriCloud