Commit 1f4c34bd authored by Joe Perches's avatar Joe Perches Committed by Greg Kroah-Hartman
Browse files

staging: ath6kl: Convert enum A_STATUS to int



Convert enum members to int as well.

Signed-off-by: default avatarJoe Perches <joe@perches.com>
Acked-by: default avatarVipin Mehta <vipin.mehta@atheros.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent a789325d
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -41,12 +41,12 @@
/* ------ Global Variable Declarations ------- */
static A_BOOL bmiDone;

A_STATUS
int
bmiBufferSend(HIF_DEVICE *device,
              A_UCHAR *buffer,
              A_UINT32 length);

A_STATUS
int
bmiBufferReceive(HIF_DEVICE *device,
                 A_UCHAR *buffer,
                 A_UINT32 length,
+36 −36
Original line number Diff line number Diff line
@@ -105,10 +105,10 @@ BMICleanup(void)
    }
}

A_STATUS
int
BMIDone(HIF_DEVICE *device)
{
    A_STATUS status;
    int status;
    A_UINT32 cid;

    if (bmiDone) {
@@ -141,10 +141,10 @@ BMIDone(HIF_DEVICE *device)
    return A_OK;
}

A_STATUS
int
BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
{
    A_STATUS status;
    int status;
    A_UINT32 cid;

    if (bmiDone) {
@@ -200,14 +200,14 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
    return A_OK;
}

A_STATUS
int
BMIReadMemory(HIF_DEVICE *device,
              A_UINT32 address,
              A_UCHAR *buffer,
              A_UINT32 length)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;
    A_UINT32 remaining, rxlen;

@@ -256,14 +256,14 @@ BMIReadMemory(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIWriteMemory(HIF_DEVICE *device,
               A_UINT32 address,
               A_UCHAR *buffer,
               A_UINT32 length)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;
    A_UINT32 remaining, txlen;
    const A_UINT32 header = sizeof(cid) + sizeof(address) + sizeof(length);
@@ -321,13 +321,13 @@ BMIWriteMemory(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIExecute(HIF_DEVICE *device,
           A_UINT32 address,
           A_UINT32 *param)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param)));
@@ -369,12 +369,12 @@ BMIExecute(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMISetAppStart(HIF_DEVICE *device,
               A_UINT32 address)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
@@ -406,13 +406,13 @@ BMISetAppStart(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIReadSOCRegister(HIF_DEVICE *device,
                   A_UINT32 address,
                   A_UINT32 *param)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
@@ -452,13 +452,13 @@ BMIReadSOCRegister(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIWriteSOCRegister(HIF_DEVICE *device,
                    A_UINT32 address,
                    A_UINT32 param)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address) + sizeof(param)));
@@ -492,7 +492,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIrompatchInstall(HIF_DEVICE *device,
                   A_UINT32 ROM_addr,
                   A_UINT32 RAM_addr,
@@ -501,7 +501,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
                   A_UINT32 *rompatch_id)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(ROM_addr) + sizeof(RAM_addr) +
@@ -548,12 +548,12 @@ BMIrompatchInstall(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIrompatchUninstall(HIF_DEVICE *device,
                     A_UINT32 rompatch_id)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(rompatch_id)));
@@ -585,14 +585,14 @@ BMIrompatchUninstall(HIF_DEVICE *device,
    return A_OK;
}

static A_STATUS
static int
_BMIrompatchChangeActivation(HIF_DEVICE *device,
                             A_UINT32 rompatch_count,
                             A_UINT32 *rompatch_list,
                             A_UINT32 do_activate)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;
    A_UINT32 length;

@@ -629,7 +629,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIrompatchActivate(HIF_DEVICE *device,
                    A_UINT32 rompatch_count,
                    A_UINT32 *rompatch_list)
@@ -637,7 +637,7 @@ BMIrompatchActivate(HIF_DEVICE *device,
    return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 1);
}

A_STATUS
int
BMIrompatchDeactivate(HIF_DEVICE *device,
                      A_UINT32 rompatch_count,
                      A_UINT32 *rompatch_list)
@@ -645,13 +645,13 @@ BMIrompatchDeactivate(HIF_DEVICE *device,
    return _BMIrompatchChangeActivation(device, rompatch_count, rompatch_list, 0);
}

A_STATUS
int
BMILZData(HIF_DEVICE *device,
          A_UCHAR *buffer,
          A_UINT32 length)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;
    A_UINT32 remaining, txlen;
    const A_UINT32 header = sizeof(cid) + sizeof(length);
@@ -695,12 +695,12 @@ BMILZData(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMILZStreamStart(HIF_DEVICE *device,
                 A_UINT32 address)
{
    A_UINT32 cid;
    A_STATUS status;
    int status;
    A_UINT32 offset;

    A_ASSERT(BMI_COMMAND_FITS(sizeof(cid) + sizeof(address)));
@@ -733,12 +733,12 @@ BMILZStreamStart(HIF_DEVICE *device,
}

/* BMI Access routines */
A_STATUS
int
bmiBufferSend(HIF_DEVICE *device,
              A_UCHAR *buffer,
              A_UINT32 length)
{
    A_STATUS status;
    int status;
    A_UINT32 timeout;
    A_UINT32 address;
    A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX];
@@ -781,13 +781,13 @@ bmiBufferSend(HIF_DEVICE *device,
    return status;
}

A_STATUS
int
bmiBufferReceive(HIF_DEVICE *device,
                 A_UCHAR *buffer,
                 A_UINT32 length,
                 A_BOOL want_timeout)
{
    A_STATUS status;
    int status;
    A_UINT32 address;
    A_UINT32 mboxAddress[HTC_MAILBOX_NUM_MAX];
    HIF_PENDING_EVENTS_INFO     hifPendingEvents;
@@ -957,10 +957,10 @@ bmiBufferReceive(HIF_DEVICE *device,
    return A_OK;
}

A_STATUS
int
BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32 length)
{
    A_STATUS status = A_ERROR;
    int status = A_ERROR;
    A_UINT32  lastWord = 0;
    A_UINT32  lastWordOffset = length & ~0x3;
    A_UINT32  unalignedBytes = length & 0x3;
@@ -997,13 +997,13 @@ BMIFastDownload(HIF_DEVICE *device, A_UINT32 address, A_UCHAR *buffer, A_UINT32
	return status;
}

A_STATUS
int
BMIRawWrite(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length)
{
    return bmiBufferSend(device, buffer, length);
}

A_STATUS
int
BMIRawRead(HIF_DEVICE *device, A_UCHAR *buffer, A_UINT32 length, A_BOOL want_timeout)
{
    return bmiBufferReceive(device, buffer, length, want_timeout);
+5 −5
Original line number Diff line number Diff line
@@ -58,7 +58,7 @@ typedef struct bus_request {
    A_UINT32 length;
    A_UINT32 request;
    void *context;
    A_STATUS status;
    int status;
    struct _HIF_SCATTER_REQ_PRIV *pScatterReq;      /* this request is a scatter request */
} BUS_REQUEST;

@@ -110,18 +110,18 @@ typedef struct _HIF_SCATTER_REQ_PRIV {

#define ATH_DEBUG_SCATTER  ATH_DEBUG_MAKE_MODULE_MASK(0)

A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo);
int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo);
void CleanupHIFScatterResources(HIF_DEVICE *device);
A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest);

#else  // HIF_LINUX_MMC_SCATTER_SUPPORT

static inline A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo) 
static inline int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
{
    return A_ENOTSUP;
}

static inline A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest) 
static inline int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
{
    return A_ENOTSUP;
}
+23 −23
Original line number Diff line number Diff line
@@ -107,8 +107,8 @@ extern A_UINT32 busspeedlow;
extern A_UINT32 debughif;

static void ResetAllCards(void);
static A_STATUS hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func);
static A_STATUS hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func);
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func);
static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func);

#ifdef DEBUG

@@ -123,7 +123,7 @@ ATH_DEBUG_INSTANTIATE_MODULE_VAR(hif,


/* ------ Functions ------ */
A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks)
int HIFInit(OSDRV_CALLBACKS *callbacks)
{
    int status;
    AR_DEBUG_ASSERT(callbacks != NULL);
@@ -152,7 +152,7 @@ A_STATUS HIFInit(OSDRV_CALLBACKS *callbacks)

}

static A_STATUS
static int
__HIFReadWrite(HIF_DEVICE *device,
             A_UINT32 address,
             A_UCHAR *buffer,
@@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
             void *context)
{
    A_UINT8 opcode;
    A_STATUS    status = A_OK;
    int    status = A_OK;
    int     ret;
    A_UINT8 *tbuffer;
    A_BOOL   bounced = FALSE;
@@ -329,7 +329,7 @@ void AddToAsyncList(HIF_DEVICE *device, BUS_REQUEST *busrequest)


/* queue a read/write request */
A_STATUS
int
HIFReadWrite(HIF_DEVICE *device,
             A_UINT32 address,
             A_UCHAR *buffer,
@@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
             A_UINT32 request,
             void *context)
{
    A_STATUS    status = A_OK;
    int    status = A_OK;
    BUS_REQUEST *busrequest;


@@ -375,7 +375,7 @@ HIFReadWrite(HIF_DEVICE *device,
                    /* interrupted, exit */
                    return A_ERROR;
                } else {
                    A_STATUS status = busrequest->status;
                    int status = busrequest->status;
                    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: sync return freeing 0x%lX: 0x%X\n", 
						      (unsigned long)busrequest, busrequest->status));
                    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: freeing req: 0x%X\n", (unsigned int)request));
@@ -402,7 +402,7 @@ static int async_task(void *param)
 {
    HIF_DEVICE *device;
    BUS_REQUEST *request;
    A_STATUS status;
    int status;
    unsigned long flags;

    device = (HIF_DEVICE *)param;
@@ -488,7 +488,7 @@ static A_INT32 IssueSDCommand(HIF_DEVICE *device, A_UINT32 opcode, A_UINT32 arg,
    return err;
}

A_STATUS ReinitSDIO(HIF_DEVICE *device)
int ReinitSDIO(HIF_DEVICE *device)
{
    A_INT32 err;
    struct mmc_host *host;
@@ -647,10 +647,10 @@ A_STATUS ReinitSDIO(HIF_DEVICE *device)
    return (err) ? A_ERROR : A_OK;
}

A_STATUS
int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{
    A_STATUS status = A_OK;
    int status = A_OK;
#if defined(CONFIG_PM)
	struct sdio_func *func = device->func;
    int old_reset_val;
@@ -690,12 +690,12 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
    return status;
}

A_STATUS
int
HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
                   void *config, A_UINT32 configLen)
{
    A_UINT32 count;
    A_STATUS status = A_OK;
    int status = A_OK;
    
    switch(opcode) {
        case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
@@ -774,7 +774,7 @@ HIFShutDownDevice(HIF_DEVICE *device)
static void
hifIRQHandler(struct sdio_func *func)
{
    A_STATUS status;
    int status;
    HIF_DEVICE *device;
    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifIRQHandler\n"));

@@ -949,10 +949,10 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
    spin_unlock_irqrestore(&device->lock, flag);
}

static A_STATUS hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
{
    int ret;
    A_STATUS status = A_OK;
    int status = A_OK;

    AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
    device = getHifDevice(func);
@@ -1080,7 +1080,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
static int hifDeviceSuspend(struct device *dev)
{
    struct sdio_func *func=dev_to_sdio_func(dev);
    A_STATUS status = A_OK;
    int status = A_OK;
    HIF_DEVICE *device;   

    device = getHifDevice(func);
@@ -1107,7 +1107,7 @@ static int hifDeviceSuspend(struct device *dev)
static int hifDeviceResume(struct device *dev)
{
    struct sdio_func *func=dev_to_sdio_func(dev);
    A_STATUS status = A_OK;
    int status = A_OK;
    HIF_DEVICE *device;   

    device = getHifDevice(func);
@@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)

static void hifDeviceRemoved(struct sdio_func *func)
{
    A_STATUS status = A_OK;
    int status = A_OK;
    HIF_DEVICE *device;
    AR_DEBUG_ASSERT(func != NULL);

@@ -1151,11 +1151,11 @@ static void hifDeviceRemoved(struct sdio_func *func)
/*
 * This should be moved to AR6K HTC layer.
 */
A_STATUS hifWaitForPendingRecv(HIF_DEVICE *device)
int hifWaitForPendingRecv(HIF_DEVICE *device)
{
    A_INT32 cnt = 10;
    A_UINT8 host_int_status;
    A_STATUS status = A_OK;
    int status = A_OK;

    do {            		    
        while (atomic_read(&device->irqHandling)) {
@@ -1233,7 +1233,7 @@ void HIFReleaseDevice(HIF_DEVICE *device)
    device->claimedContext = NULL;
}

A_STATUS HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
{
    if (device->htcCallbacks.context != NULL) {
            /* already in use! */
+6 −6
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ static HIF_SCATTER_REQ *AllocScatterReq(HIF_DEVICE *device)
}

    /* called by async task to perform the operation synchronously using direct MMC APIs  */
A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
{
    int                     i;
    A_UINT8                 rw;
@@ -89,7 +89,7 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
    struct mmc_data         data;
    HIF_SCATTER_REQ_PRIV   *pReqPriv;   
    HIF_SCATTER_REQ        *pReq;       
    A_STATUS                status = A_OK;
    int                status = A_OK;
    struct                  scatterlist *pSg;
    
    pReqPriv = busrequest->pScatterReq;
@@ -199,9 +199,9 @@ A_STATUS DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
}

    /* callback to issue a read-write scatter request */
static A_STATUS HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
{
    A_STATUS             status = A_EINVAL;
    int             status = A_EINVAL;
    A_UINT32             request = pReq->Request;
    HIF_SCATTER_REQ_PRIV *pReqPriv = (HIF_SCATTER_REQ_PRIV *)pReq->HIFPrivate[0];
    
@@ -275,9 +275,9 @@ static A_STATUS HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
}

    /* setup of HIF scatter resources */
A_STATUS SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *pInfo)
{
    A_STATUS              status = A_ERROR;   
    int              status = A_ERROR;
    int                   i;
    HIF_SCATTER_REQ_PRIV *pReqPriv;
    BUS_REQUEST          *busrequest;
Loading