[haiku-commits] r41165 - haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx

  • From: kallisti5@xxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Sat, 2 Apr 2011 06:29:20 +0200 (CEST)

Author: kallisti5
Date: 2011-04-02 06:29:19 +0200 (Sat, 02 Apr 2011)
New Revision: 41165
Changeset: https://dev.haiku-os.org/changeset/41165

Modified:
   
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp
   
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemLED.cpp
Log:
simple space style cleanup; fix case of bool; no functional change

Modified: 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp
===================================================================
--- 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp
 2011-04-01 21:01:11 UTC (rev 41164)
+++ 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemDevice.cpp
 2011-04-02 04:29:19 UTC (rev 41165)
@@ -74,7 +74,7 @@
                                break;
                        }
 
-       } while ((result < 0) && (retries < MAX_USB_IO_RETRIES ) );
+       } while ((result < 0) && (retries < MAX_USB_IO_RETRIES));
 
        if (result < 0) {
                TRACE_ALWAYS("Error: USB read request failure."
@@ -122,7 +122,7 @@
                                break;
                        }
 
-       } while ((result < 0) && (retries < MAX_USB_IO_RETRIES ) );
+       } while ((result < 0) && (retries < MAX_USB_IO_RETRIES));
 
        if (result < 0) {
                TRACE_ALWAYS("Error: USB write request failure."
@@ -409,9 +409,9 @@
        }
        */
 
-       *numBytes = header[1] | ( header[2] << 8 );
+       *numBytes = header[1] | (header[2] << 8);
 
-       if (header[0] & 0xBF ) {
+       if (header[0] & 0xBF) {
                TRACE_ALWAYS("RX error %d occured !\n", header[0]);
        }
 
@@ -1019,9 +1019,9 @@
        struct stat             cfgStat;
        int                             dtaread = 0;
 
-       int fh = open( FIRM_CFG, O_RDONLY );
+       int fh = open(FIRM_CFG, O_RDONLY);
 
-       if (fh == B_ERROR || fstat(fh, &cfgStat) < 0 ) {
+       if (fh == B_ERROR || fstat(fh, &cfgStat) < 0) {
                TRACE_ALWAYS("Error: Unable to open the configuration at %s\n", 
FIRM_CFG);
                return fh;
        }
@@ -1030,7 +1030,7 @@
 
        buffer=(unsigned int*)malloc(MAX_USB_TRANSFER);
 
-       if ( !buffer ) {
+       if (!buffer) {
                TRACE_ALWAYS("Error: Memory allocation error.\n");
                return B_ERROR;
        }
@@ -1135,9 +1135,9 @@
        int                             chipwriteloc = 0;
        int                             readposition = 0;
 
-       int fh = open( FIRM_CFG, O_RDONLY );
+       int fh = open(FIRM_CFG, O_RDONLY);
 
-       if (fh == B_ERROR || fstat(fh, &cfgStat) < 0 ) {
+       if (fh == B_ERROR || fstat(fh, &cfgStat) < 0) {
                TRACE_ALWAYS("Error: Unable to open the configuration at %s\n", 
FIRM_CFG);
                return fh;
        }
@@ -1149,7 +1149,7 @@
 
        buffer=(unsigned int*)malloc(MAX_USB_TRANSFER);
 
-       if ( !buffer ) {
+       if (!buffer) {
                TRACE_ALWAYS("Error: Memory allocation error.\n");
                return B_ERROR;
        }
@@ -1179,7 +1179,7 @@
 
                // As readposition should always be less then MAX_USB_TRANSFER
                // and we have checked the validity of read's output above.
-               if ( WriteRegister(loc + chipwriteloc, readposition, buffer) != 
B_OK)
+               if (WriteRegister(loc + chipwriteloc, readposition, buffer) != 
B_OK)
                {
                        TRACE_ALWAYS("Write failure\n");
                        result = B_ERROR;
@@ -1215,9 +1215,9 @@
        struct stat     firmStat;
        status_t                result;
 
-       int fh = open( FIRM_BIN, O_RDONLY );
+       int fh = open(FIRM_BIN, O_RDONLY);
 
-       if (fh == B_ERROR || fstat(fh, &firmStat) < 0 ) {
+       if (fh == B_ERROR || fstat(fh, &firmStat) < 0) {
                TRACE_ALWAYS("Error: Unable to open the firmware at %s\n", 
FIRM_BIN);
                return fh;
        } else
@@ -1234,7 +1234,7 @@
        // For the push we load the file into the buffer
        buffer=(unsigned int*)malloc(MAX_USB_TRANSFER);
 
-       if ( !buffer  ) {
+       if (!buffer) {
                TRACE_ALWAYS("Error: Memory allocation error.\n");
                return B_ERROR;
        }
@@ -1242,8 +1242,8 @@
        // TODO : Firmware Download : investigate this, SHADOW clearing thing 
causes a KDL atm
        #if 0
        // Clear the NVM SHADOW signature always before fw download.
-       WriteRegister( EEPROM_CAL_DATA_INTERNAL_LOC-4, 1, 0);
-       WriteRegister( EEPROM_CAL_DATA_INTERNAL_LOC-8, 1, 0);
+       WriteRegister(EEPROM_CAL_DATA_INTERNAL_LOC-4, 1, 0);
+       WriteRegister(EEPROM_CAL_DATA_INTERNAL_LOC-8, 1, 0);
        #endif
 
        // We have to spoon feed the data to the usb device as it is probbably 
too
@@ -1271,7 +1271,7 @@
 
                // As readposition should always be less then MAX_USB_TRANSFER
                // and we have checked the validity of read's output above.
-               if ( WriteRegister(loc + chipwriteloc, readposition, buffer) != 
B_OK)
+               if (WriteRegister(loc + chipwriteloc, readposition, buffer) != 
B_OK)
                {
                        TRACE_ALWAYS("Write failure\n");
                        result = B_ERROR;

Modified: 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemLED.cpp
===================================================================
--- 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemLED.cpp
    2011-04-01 21:01:11 UTC (rev 41164)
+++ 
haiku/trunk/src/add-ons/kernel/drivers/network/wimax/usb_beceemwmx/BeceemLED.cpp
    2011-04-02 04:29:19 UTC (rev 41165)
@@ -11,9 +11,11 @@
  *     driver what GPIO led register is used for what device state.
  */
 
+
 #include "Settings.h"
 #include "BeceemLED.h"
 
+
 BeceemLED::BeceemLED()
 {
        TRACE("Debug: Load LED handler\n");
@@ -270,7 +272,7 @@
 status_t
 BeceemLED::LEDThread(void *cookie)
 {
-       bool LEDisON = false;
+       bool ledactive = false;
        BeceemLED *led = (BeceemLED *)cookie;
 
        // While the driver is active
@@ -326,14 +328,14 @@
 
                if (blink == true) {
                                led->LEDOff(uiLedIndex);
-                               LEDisON = false;
+                               ledactive = false;
                                snooze(500000);
                                led->LEDOn(uiLedIndex);
-                               LEDisON = true;
+                               ledactive = true;
                } else {
                        // else we just flip on the color it needs to be.
                        led->LEDOn(uiLedIndex);
-                       LEDisON = true;
+                       ledactive = true;
                        snooze(500000);
                }
 


Other related posts: