diff options
Diffstat (limited to 'drivers/staging/bcm/Bcmchar.c')
-rw-r--r-- | drivers/staging/bcm/Bcmchar.c | 49 |
1 files changed, 23 insertions, 26 deletions
diff --git a/drivers/staging/bcm/Bcmchar.c b/drivers/staging/bcm/Bcmchar.c index 639ba96adb3..87b74ca84c4 100644 --- a/drivers/staging/bcm/Bcmchar.c +++ b/drivers/staging/bcm/Bcmchar.c @@ -49,11 +49,8 @@ static int bcm_char_release(struct inode *inode, struct file *filp) pTarang = (struct bcm_tarang_data *)filp->private_data; - if (pTarang == NULL) { - BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, - "ptarang is null\n"); + if (pTarang == NULL) return 0; - } Adapter = pTarang->Adapter; @@ -119,7 +116,7 @@ static ssize_t bcm_char_read(struct file *filp, char __user *buf, size_t size, return -ENODEV; } - if (FALSE == Adapter->fw_download_done) + if (false == Adapter->fw_download_done) return -EACCES; down(&Adapter->RxAppControlQueuelock); @@ -180,7 +177,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) if (Adapter->device_removed) return -EFAULT; - if (FALSE == Adapter->fw_download_done) { + if (false == Adapter->fw_download_done) { switch (cmd) { case IOCTL_MAC_ADDR_REQ: case IOCTL_LINK_REQ: @@ -425,7 +422,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) uiOperation = gpio_info.uiGpioValue; value = (1<<uiBit); - if (IsReqGpioIsLedInNVM(Adapter, value) == FALSE) { + if (IsReqGpioIsLedInNVM(Adapter, value) == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to LED !!!", value); Status = -EINVAL; break; @@ -572,7 +569,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) if (copy_from_user(&gpio_multi_info, IoBuffer.InputBuffer, IoBuffer.InputLength)) return -EFAULT; - if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_info[WIMAX_IDX].uiGPIOMask) == FALSE) { + if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_info[WIMAX_IDX].uiGPIOMask) == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!", pgpio_multi_info[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap); @@ -665,7 +662,7 @@ static long bcm_char_ioctl(struct file *filp, UINT cmd, ULONG arg) } /* Validating the request */ - if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_mode[WIMAX_IDX].uiGPIOMask) == FALSE) { + if (IsReqGpioIsLedInNVM(Adapter, pgpio_multi_mode[WIMAX_IDX].uiGPIOMask) == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "Sorry, Requested GPIO<0x%X> is not correspond to NVM LED bit map<0x%X>!!!", pgpio_multi_mode[WIMAX_IDX].uiGPIOMask, Adapter->gpioBitMap); @@ -768,10 +765,10 @@ cntrlEnd: if (down_trylock(&Adapter->fw_download_sema)) return -EBUSY; - Adapter->bBinDownloaded = FALSE; + Adapter->bBinDownloaded = false; Adapter->fw_download_process_pid = current->pid; - Adapter->bCfgDownloaded = FALSE; - Adapter->fw_download_done = FALSE; + Adapter->bCfgDownloaded = false; + Adapter->fw_download_done = false; netif_carrier_off(Adapter->dev); netif_stop_queue(Adapter->dev); Status = reset_card_proc(Adapter); @@ -848,7 +845,7 @@ cntrlEnd: if (Adapter->LEDInfo.led_thread_running & BCM_LED_THREAD_RUNNING_ACTIVELY) { Adapter->DriverState = DRIVER_INIT; - Adapter->LEDInfo.bLedInitDone = FALSE; + Adapter->LEDInfo.bLedInitDone = false; wake_up(&Adapter->LEDInfo.notify_led_event); } } @@ -900,7 +897,7 @@ cntrlEnd: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Unable to send interrupt...\n"); timeout = 5*HZ; - Adapter->waiting_to_fw_download_done = FALSE; + Adapter->waiting_to_fw_download_done = false; wait_event_timeout(Adapter->ioctl_fw_dnld_wait_queue, Adapter->waiting_to_fw_download_done, timeout); Adapter->fw_download_process_pid = INVALID_PID; @@ -1052,7 +1049,7 @@ cntrlEnd: if (tracing_flag) Adapter->pTarangs->MacTracingEnabled = TRUE; else - Adapter->pTarangs->MacTracingEnabled = FALSE; + Adapter->pTarangs->MacTracingEnabled = false; break; } @@ -1109,7 +1106,7 @@ cntrlEnd: } case IOCTL_BCM_WAKE_UP_DEVICE_FROM_IDLE: - if ((FALSE == Adapter->bTriedToWakeUpFromlowPowerMode) && (TRUE == Adapter->IdleMode)) { + if ((false == Adapter->bTriedToWakeUpFromlowPowerMode) && (TRUE == Adapter->IdleMode)) { Adapter->usIdleModePattern = ABORT_IDLE_MODE; Adapter->bWakeUpDevice = TRUE; wake_up(&Adapter->process_rx_cntrlpkt); @@ -1168,7 +1165,7 @@ cntrlEnd: break; } - if (pBulkBuffer->SwapEndian == FALSE) + if (pBulkBuffer->SwapEndian == false) Status = wrmWithLock(Adapter, (UINT)pBulkBuffer->Register, (PCHAR)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG)); else Status = wrmaltWithLock(Adapter, (UINT)pBulkBuffer->Register, (PUINT)pBulkBuffer->Values, IoBuffer.InputLength - 2*sizeof(ULONG)); @@ -1387,7 +1384,7 @@ cntrlEnd: if (IsFlash2x(Adapter)) BcmFlash2xWriteSig(Adapter, Adapter->eActiveDSD); - Adapter->bHeaderChangeAllowed = FALSE; + Adapter->bHeaderChangeAllowed = false; up(&Adapter->NVMRdmWrmLock); @@ -1432,7 +1429,7 @@ cntrlEnd: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "\nsFlash2xRead.bVerify :%x\n", sFlash2xRead.bVerify); /* This was internal to driver for raw read. now it has ben exposed to user space app. */ - if (validateFlash2xReadWrite(Adapter, &sFlash2xRead) == FALSE) + if (validateFlash2xReadWrite(Adapter, &sFlash2xRead) == false) return STATUS_FAILURE; NOB = sFlash2xRead.numOfBytes; @@ -1510,7 +1507,7 @@ cntrlEnd: } /* First make this False so that we can enable the Sector Permission Check in BeceemFlashBulkWrite */ - Adapter->bAllDSDWriteAllow = FALSE; + Adapter->bAllDSDWriteAllow = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_FLASH2X_SECTION_WRITE Called"); @@ -1531,7 +1528,7 @@ cntrlEnd: return -EINVAL; } - if (validateFlash2xReadWrite(Adapter, &sFlash2xWrite) == FALSE) + if (validateFlash2xReadWrite(Adapter, &sFlash2xWrite) == false) return STATUS_FAILURE; InputAddr = sFlash2xWrite.pDataBuff; @@ -1686,7 +1683,7 @@ cntrlEnd: case IOCTL_BCM_IDENTIFY_ACTIVE_SECTION: { /* Right Now we are taking care of only DSD */ - Adapter->bAllDSDWriteAllow = FALSE; + Adapter->bAllDSDWriteAllow = false; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_IDENTIFY_ACTIVE_SECTION called"); Status = STATUS_SUCCESS; } @@ -1697,7 +1694,7 @@ cntrlEnd: Status = STATUS_SUCCESS; BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "IOCTL_BCM_COPY_SECTION Called"); - Adapter->bAllDSDWriteAllow = FALSE; + Adapter->bAllDSDWriteAllow = false; if (IsFlash2x(Adapter) != TRUE) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Flash Does not have 2.x map"); return -EINVAL; @@ -1720,12 +1717,12 @@ cntrlEnd: BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "offset :%x", sCopySectStrut.offset); BCM_DEBUG_PRINT(Adapter, DBG_TYPE_OTHERS, OSAL_DBG, DBG_LVL_ALL, "NOB :%x", sCopySectStrut.numOfBytes); - if (IsSectionExistInFlash(Adapter, sCopySectStrut.SrcSection) == FALSE) { + if (IsSectionExistInFlash(Adapter, sCopySectStrut.SrcSection) == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Source Section<%x> does not exixt in Flash ", sCopySectStrut.SrcSection); return -EINVAL; } - if (IsSectionExistInFlash(Adapter, sCopySectStrut.DstSection) == FALSE) { + if (IsSectionExistInFlash(Adapter, sCopySectStrut.DstSection) == false) { BCM_DEBUG_PRINT(Adapter, DBG_TYPE_PRINTK, 0, 0, "Destinatio Section<%x> does not exixt in Flash ", sCopySectStrut.DstSection); return -EINVAL; } @@ -1924,7 +1921,7 @@ cntrlEnd: OutPutBuff = OutPutBuff + ReadBytes; } } - Adapter->bFlashRawRead = FALSE; + Adapter->bFlashRawRead = false; up(&Adapter->NVMRdmWrmLock); kfree(pReadBuff); break; |