simple space style cleanup; fix case of bool; no functional change

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@41165 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Alexander von Gluck IV 2011-04-02 04:29:19 +00:00
parent 1927d0ab3e
commit 2617169152
2 changed files with 23 additions and 21 deletions

View File

@ -74,7 +74,7 @@ BeceemDevice::ReadRegister(unsigned int reg, size_t size, uint32_t* buffer)
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 @@ BeceemDevice::WriteRegister(unsigned int reg, size_t size, uint32_t* buffer)
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 @@ BeceemDevice::Read(uint8 *buffer, size_t *numBytes)
}
*/
*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 @@ BeceemDevice::LoadConfig()
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 @@ BeceemDevice::LoadConfig()
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 @@ BeceemDevice::PushConfig(unsigned int loc)
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 @@ BeceemDevice::PushConfig(unsigned int loc)
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 @@ BeceemDevice::PushConfig(unsigned int loc)
// 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 @@ BeceemDevice::PushFirmware(unsigned int loc)
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 @@ BeceemDevice::PushFirmware(unsigned int loc)
// 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 @@ BeceemDevice::PushFirmware(unsigned int loc)
// 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 @@ BeceemDevice::PushFirmware(unsigned int loc)
// 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;

View File

@ -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 @@ BeceemLED::LEDOff(unsigned int index)
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 @@ BeceemLED::LEDThread(void *cookie)
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);
}