Commit 1071a134 authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: ath6kl: Remove A_BOOL and TRUE/FALSE



Use kernel bool and true/false.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 949c3676
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -39,7 +39,7 @@
#define BMI_COMMUNICATION_TIMEOUT       100000

/* ------ Global Variable Declarations ------- */
static A_BOOL bmiDone;
static bool bmiDone;

int
bmiBufferSend(HIF_DEVICE *device,
@@ -50,6 +50,6 @@ int
bmiBufferReceive(HIF_DEVICE *device,
                 A_UCHAR *buffer,
                 A_UINT32 length,
                 A_BOOL want_timeout);
                 bool want_timeout);

#endif
+14 −14
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ and does not use the HTC protocol nor even DMA -- it is intentionally kept
very simple.
*/

static A_BOOL pendingEventsFuncCheck = FALSE; 
static bool pendingEventsFuncCheck = false;
static A_UINT32 *pBMICmdCredits;
static A_UCHAR *pBMICmdBuf;
#define MAX_BMI_CMDBUF_SZ (BMI_DATASZ_MAX + \
@@ -66,8 +66,8 @@ static A_UCHAR *pBMICmdBuf;
void
BMIInit(void)
{
    bmiDone = FALSE;
    pendingEventsFuncCheck = FALSE;
    bmiDone = false;
    pendingEventsFuncCheck = false;

    /*
     * On some platforms, it's not possible to DMA to a static variable
@@ -117,7 +117,7 @@ BMIDone(HIF_DEVICE *device)
    }

    AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
    bmiDone = TRUE;
    bmiDone = true;
    cid = BMI_DONE;

    status = bmiBufferSend(device, (A_UCHAR *)&cid, sizeof(cid));
@@ -162,7 +162,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
    }

    status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_ver,
                                                sizeof(targ_info->target_ver), TRUE);
                                                sizeof(targ_info->target_ver), true);
    if (status != A_OK) {
        AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Version from the device\n"));
        return A_ERROR;
@@ -171,7 +171,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
    if (targ_info->target_ver == TARGET_VERSION_SENTINAL) {
        /* Determine how many bytes are in the Target's targ_info */
        status = bmiBufferReceive(device, (A_UCHAR *)&targ_info->target_info_byte_count,
                                            sizeof(targ_info->target_info_byte_count), TRUE);
                                            sizeof(targ_info->target_info_byte_count), true);
        if (status != A_OK) {
            AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info Byte Count from the device\n"));
            return A_ERROR;
@@ -186,7 +186,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
        /* Read the remainder of the targ_info */
        status = bmiBufferReceive(device,
                        ((A_UCHAR *)targ_info)+sizeof(targ_info->target_info_byte_count),
                        sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), TRUE);
                        sizeof(*targ_info)-sizeof(targ_info->target_info_byte_count), true);
        if (status != A_OK) {
            AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read Target Info (%d bytes) from the device\n",
                        					targ_info->target_info_byte_count));
@@ -243,7 +243,7 @@ BMIReadMemory(HIF_DEVICE *device,
            AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to write to the device\n"));
            return A_ERROR;
        }
        status = bmiBufferReceive(device, pBMICmdBuf, rxlen, TRUE);
        status = bmiBufferReceive(device, pBMICmdBuf, rxlen, true);
        if (status != A_OK) {
            AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
            return A_ERROR;
@@ -357,7 +357,7 @@ BMIExecute(HIF_DEVICE *device,
        return A_ERROR;
    }

    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), FALSE);
    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), false);
    if (status != A_OK) {
        AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
        return A_ERROR;
@@ -441,7 +441,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
        return A_ERROR;
    }

    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), TRUE);
    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*param), true);
    if (status != A_OK) {
        AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
        return A_ERROR;
@@ -537,7 +537,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
        return A_ERROR;
    }

    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), TRUE);
    status = bmiBufferReceive(device, pBMICmdBuf, sizeof(*rompatch_id), true);
    if (status != A_OK) {
        AR_DEBUG_PRINTF(ATH_DEBUG_ERR, ("Unable to read from the device\n"));
        return A_ERROR;
@@ -785,7 +785,7 @@ int
bmiBufferReceive(HIF_DEVICE *device,
                 A_UCHAR *buffer,
                 A_UINT32 length,
                 A_BOOL want_timeout)
                 bool want_timeout)
{
    int status;
    A_UINT32 address;
@@ -800,7 +800,7 @@ bmiBufferReceive(HIF_DEVICE *device,
                           HIF_DEVICE_GET_PENDING_EVENTS_FUNC,
                           &getPendingEventsFunc,
                           sizeof(getPendingEventsFunc));
        pendingEventsFuncCheck = TRUE;
        pendingEventsFuncCheck = true;
    }
                       
    HIFConfigureDevice(device, HIF_DEVICE_GET_MBOX_ADDR,
@@ -1004,7 +1004,7 @@ BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length)
}

int
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout)
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, bool want_timeout)
{
    return bmiBufferReceive(device, buffer, length, want_timeout);
}
+1 −1
Original line number Diff line number Diff line
@@ -74,7 +74,7 @@ static INLINE void SetExtendedMboxWindowInfo(A_UINT16 Manfid, HIF_DEVICE_MBOX_IN
            pInfo->GMboxSize = HIF_GMBOX_WIDTH;
            break;
        default:
            A_ASSERT(FALSE);
            A_ASSERT(false);
            break;
    }
}
+3 −3
Original line number Diff line number Diff line
@@ -78,9 +78,9 @@ struct hif_device {
    HTC_CALLBACKS htcCallbacks;
    A_UINT8     *dma_buffer;
    DL_LIST      ScatterReqHead;                /* scatter request list head */
    A_BOOL       scatter_enabled;               /* scatter enabled flag */
    A_BOOL   is_suspend;
    A_BOOL   is_disabled;
    bool       scatter_enabled;               /* scatter enabled flag */
    bool   is_suspend;
    bool   is_disabled;
    atomic_t   irqHandling;
    HIF_DEVICE_POWER_CHANGE_TYPE powerConfig;
    const struct sdio_device_id *id;
+14 −14
Original line number Diff line number Diff line
@@ -46,7 +46,7 @@
 */
#define BUFFER_NEEDS_BOUNCE(buffer)  (((unsigned long)(buffer) & 0x3) || !virt_addr_valid((buffer)))
#else
#define BUFFER_NEEDS_BOUNCE(buffer)   (FALSE)
#define BUFFER_NEEDS_BOUNCE(buffer)   (false)
#endif

/* ATHENV */
@@ -164,7 +164,7 @@ __HIFReadWrite(HIF_DEVICE *device,
    int    status = A_OK;
    int     ret;
    A_UINT8 *tbuffer;
    A_BOOL   bounced = FALSE;
    bool   bounced = false;

    AR_DEBUG_ASSERT(device != NULL);
    AR_DEBUG_ASSERT(device->func != NULL);
@@ -243,7 +243,7 @@ __HIFReadWrite(HIF_DEVICE *device,
                    /* copy the write data to the dma buffer */
                AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
                memcpy(tbuffer, buffer, length);
                bounced = TRUE;
                bounced = true;
            } else {
                tbuffer = buffer;    
            }
@@ -265,7 +265,7 @@ __HIFReadWrite(HIF_DEVICE *device,
                AR_DEBUG_ASSERT(device->dma_buffer != NULL);
                AR_DEBUG_ASSERT(length <= HIF_DMA_BUFFER_SIZE);
                tbuffer = device->dma_buffer;
                bounced = TRUE;
                bounced = true;
            } else {
                tbuffer = buffer;    
            }
@@ -299,7 +299,7 @@ __HIFReadWrite(HIF_DEVICE *device,
                            ("AR6000: SDIO bus operation failed! MMC stack returned : %d \n", ret));
            status = A_ERROR;
        }
    } while (FALSE);
    } while (false);

    return status;
}
@@ -725,7 +725,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
            }
            status = SetupHIFScatterSupport(device, (HIF_DEVICE_SCATTER_SUPPORT_INFO *)config);
            if (status) {
                device->scatter_enabled = FALSE;           
                device->scatter_enabled = false;
            }
            break; 
        case HIF_DEVICE_GET_OS_DEVICE:
@@ -837,7 +837,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
    device = getHifDevice(func);

    device->id = id;
    device->is_disabled = TRUE;
    device->is_disabled = true;

    spin_lock_init(&device->lock);

@@ -848,7 +848,7 @@ static int hifDeviceInserted(struct sdio_func *func, const struct sdio_device_id
    if (!nohifscattersupport) {
            /* try to allow scatter operation on all instances,
             * unless globally overridden */
        device->scatter_enabled = TRUE;
        device->scatter_enabled = true;
    }

    /* Initialize the bus requests to be used later */
@@ -989,7 +989,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
    sdio_release_host(device->func);

    if (status == A_OK) {
        device->is_disabled = TRUE;
        device->is_disabled = true;
    }
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));

@@ -1036,7 +1036,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
					  __FUNCTION__, HIF_MBOX_BLOCK_SIZE, ret));
            return A_ERROR;
        }
        device->is_disabled = FALSE;
        device->is_disabled = false;
        /* create async I/O thread */
        if (!device->async_task) {
            device->async_shutdown = 0;
@@ -1086,10 +1086,10 @@ static int hifDeviceSuspend(struct device *dev)
    device = getHifDevice(func);
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceSuspend\n"));
    if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
        device->is_suspend = TRUE; /* set true first for PowerStateChangeNotify(..) */
        device->is_suspend = true; /* set true first for PowerStateChangeNotify(..) */
        status = osdrvCallbacks.deviceSuspendHandler(device->claimedContext);
        if (status != A_OK) {
            device->is_suspend = FALSE;
            device->is_suspend = false;
        }
    }
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));
@@ -1115,7 +1115,7 @@ static int hifDeviceResume(struct device *dev)
    if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
        status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
        if (status == A_OK) {
            device->is_suspend = FALSE;
            device->is_suspend = false;
        }
    }
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceResume\n"));
@@ -1137,7 +1137,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
    }

    if (device->is_disabled) {
        device->is_disabled = FALSE;
        device->is_disabled = false;
    } else {
        status = hifDisableFunc(device, func);
    }
Loading