Skip to content

Commit

Permalink
staging: ath6kl: Remove #define A_OK
Browse files Browse the repository at this point in the history
Just use 0.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Joe Perches authored and Greg Kroah-Hartman committed Feb 2, 2011
1 parent a1d4652 commit 4f69cef
Show file tree
Hide file tree
Showing 34 changed files with 560 additions and 561 deletions.
30 changes: 15 additions & 15 deletions drivers/staging/ath6kl/bmi/src/bmi.c
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ BMIDone(HIF_DEVICE *device)

if (bmiDone) {
AR_DEBUG_PRINTF (ATH_DEBUG_BMI, ("BMIDone skipped\n"));
return A_OK;
return 0;
}

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Enter (device: 0x%p)\n", device));
Expand All @@ -138,7 +138,7 @@ BMIDone(HIF_DEVICE *device)

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Done: Exit\n"));

return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -197,7 +197,7 @@ BMIGetTargetInfo(HIF_DEVICE *device, struct bmi_target_info *targ_info)
AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Get Target Info: Exit (ver: 0x%x type: 0x%x)\n",
targ_info->target_ver, targ_info->target_type));

return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -253,7 +253,7 @@ BMIReadMemory(HIF_DEVICE *device,
}

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read Memory: Exit\n"));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -318,7 +318,7 @@ BMIWriteMemory(HIF_DEVICE *device,

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Write Memory: Exit\n"));

return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -366,7 +366,7 @@ BMIExecute(HIF_DEVICE *device,
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Execute: Exit (param: %d)\n", *param));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -403,7 +403,7 @@ BMISetAppStart(HIF_DEVICE *device,
}

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Set App Start: Exit\n"));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -449,7 +449,7 @@ BMIReadSOCRegister(HIF_DEVICE *device,
A_MEMCPY(param, pBMICmdBuf, sizeof(*param));

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit (value: %d)\n", *param));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -489,7 +489,7 @@ BMIWriteSOCRegister(HIF_DEVICE *device,
}

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Read SOC Register: Exit\n"));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -545,7 +545,7 @@ BMIrompatchInstall(HIF_DEVICE *device,
A_MEMCPY(rompatch_id, pBMICmdBuf, sizeof(*rompatch_id));

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch Install: (rompatch_id=%d)\n", *rompatch_id));
return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -582,7 +582,7 @@ BMIrompatchUninstall(HIF_DEVICE *device,
}

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI rompatch UNinstall: (rompatch_id=0x%x)\n", rompatch_id));
return A_OK;
return 0;
}

static int
Expand Down Expand Up @@ -626,7 +626,7 @@ _BMIrompatchChangeActivation(HIF_DEVICE *device,

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI Change rompatch Activation: Exit\n"));

return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -692,7 +692,7 @@ BMILZData(HIF_DEVICE *device,

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Data: Exit\n"));

return A_OK;
return 0;
}

int
Expand Down Expand Up @@ -729,7 +729,7 @@ BMILZStreamStart(HIF_DEVICE *device,

AR_DEBUG_PRINTF(ATH_DEBUG_BMI, ("BMI LZ Stream Start: Exit\n"));

return A_OK;
return 0;
}

/* BMI Access routines */
Expand Down Expand Up @@ -954,7 +954,7 @@ bmiBufferReceive(HIF_DEVICE *device,
return A_ERROR;
}

return A_OK;
return 0;
}

int
Expand Down
46 changes: 23 additions & 23 deletions drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ int HIFInit(OSDRV_CALLBACKS *callbacks)
return A_ERROR;
}

return A_OK;
return 0;

}

Expand All @@ -161,7 +161,7 @@ __HIFReadWrite(HIF_DEVICE *device,
void *context)
{
u8 opcode;
int status = A_OK;
int status = 0;
int ret;
u8 *tbuffer;
bool bounced = false;
Expand Down Expand Up @@ -337,7 +337,7 @@ HIFReadWrite(HIF_DEVICE *device,
u32 request,
void *context)
{
int status = A_OK;
int status = 0;
BUS_REQUEST *busrequest;


Expand Down Expand Up @@ -644,13 +644,13 @@ int ReinitSDIO(HIF_DEVICE *device)
sdio_release_host(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -ReinitSDIO \n"));

return (err) ? A_ERROR : A_OK;
return (err) ? A_ERROR : 0;
}

int
PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
{
int status = A_OK;
int status = 0;
#if defined(CONFIG_PM)
struct sdio_func *func = device->func;
int old_reset_val;
Expand Down Expand Up @@ -678,7 +678,7 @@ PowerStateChangeNotify(HIF_DEVICE *device, HIF_DEVICE_POWER_CHANGE_TYPE config)
if (device->powerConfig == HIF_DEVICE_POWER_CUT) {
status = ReinitSDIO(device);
}
if (status == A_OK) {
if (status == 0) {
status = hifEnableFunc(device, func);
}
break;
Expand All @@ -695,7 +695,7 @@ HIFConfigureDevice(HIF_DEVICE *device, HIF_DEVICE_CONFIG_OPCODE opcode,
void *config, u32 configLen)
{
u32 count;
int status = A_OK;
int status = 0;

switch(opcode) {
case HIF_DEVICE_GET_MBOX_BLOCK_SIZE:
Expand Down Expand Up @@ -785,7 +785,7 @@ hifIRQHandler(struct sdio_func *func)
status = device->htcCallbacks.dsrHandler(device->htcCallbacks.context);
sdio_claim_host(device->func);
atomic_set(&device->irqHandling, 0);
AR_DEBUG_ASSERT(status == A_OK || status == A_ECANCELED);
AR_DEBUG_ASSERT(status == 0 || status == A_ECANCELED);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifIRQHandler\n"));
}

Expand All @@ -797,7 +797,7 @@ static int startup_task(void *param)
device = (HIF_DEVICE *)param;
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: call HTC from startup_task\n"));
/* start up inform DRV layer */
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != A_OK) {
if ((osdrvCallbacks.deviceInsertedHandler(osdrvCallbacks.context,device)) != 0) {
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
}
return 0;
Expand All @@ -814,7 +814,7 @@ static int enable_task(void *param)
if (device &&
device->claimedContext &&
osdrvCallbacks.devicePowerChangeHandler &&
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != A_OK)
osdrvCallbacks.devicePowerChangeHandler(device->claimedContext, HIF_DEVICE_POWER_UP) != 0)
{
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: Device rejected\n"));
}
Expand Down Expand Up @@ -952,7 +952,7 @@ hifFreeBusRequest(HIF_DEVICE *device, BUS_REQUEST *busrequest)
static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)
{
int ret;
int status = A_OK;
int status = 0;

AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDisableFunc\n"));
device = getHifDevice(func);
Expand Down Expand Up @@ -988,7 +988,7 @@ static int hifDisableFunc(HIF_DEVICE *device, struct sdio_func *func)

sdio_release_host(device->func);

if (status == A_OK) {
if (status == 0) {
device->is_disabled = true;
}
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDisableFunc\n"));
Expand All @@ -1001,7 +1001,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
struct task_struct* pTask;
const char *taskName = NULL;
int (*taskFunc)(void *) = NULL;
int ret = A_OK;
int ret = 0;

AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifEnableFunc\n"));
device = getHifDevice(func);
Expand Down Expand Up @@ -1055,7 +1055,7 @@ static int hifEnableFunc(HIF_DEVICE *device, struct sdio_func *func)
if (!device->claimedContext) {
taskFunc = startup_task;
taskName = "AR6K startup";
ret = A_OK;
ret = 0;
#if defined(CONFIG_PM)
} else {
taskFunc = enable_task;
Expand All @@ -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);
int status = A_OK;
int status = 0;
HIF_DEVICE *device;

device = getHifDevice(func);
Expand All @@ -1095,7 +1095,7 @@ static int hifDeviceSuspend(struct device *dev)
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceSuspend\n"));

switch (status) {
case A_OK:
case 0:
return 0;
case A_EBUSY:
return -EBUSY; /* Hack for kernel in order to support deep sleep and wow */
Expand All @@ -1107,14 +1107,14 @@ static int hifDeviceSuspend(struct device *dev)
static int hifDeviceResume(struct device *dev)
{
struct sdio_func *func=dev_to_sdio_func(dev);
int status = A_OK;
int status = 0;
HIF_DEVICE *device;

device = getHifDevice(func);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: +hifDeviceResume\n"));
if (device && device->claimedContext && osdrvCallbacks.deviceSuspendHandler) {
status = osdrvCallbacks.deviceResumeHandler(device->claimedContext);
if (status == A_OK) {
if (status == 0) {
device->is_suspend = false;
}
}
Expand All @@ -1126,7 +1126,7 @@ static int hifDeviceResume(struct device *dev)

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

Expand All @@ -1144,7 +1144,7 @@ static void hifDeviceRemoved(struct sdio_func *func)
CleanupHIFScatterResources(device);

delHifDevice(device);
AR_DEBUG_ASSERT(status == A_OK);
AR_DEBUG_ASSERT(status == 0);
AR_DEBUG_PRINTF(ATH_DEBUG_TRACE, ("AR6000: -hifDeviceRemoved\n"));
}

Expand All @@ -1155,7 +1155,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
{
s32 cnt = 10;
u8 host_int_status;
int status = A_OK;
int status = 0;

do {
while (atomic_read(&device->irqHandling)) {
Expand All @@ -1178,7 +1178,7 @@ int hifWaitForPendingRecv(HIF_DEVICE *device)
("AR6000: %s(), Unable clear up pending IRQ before the system suspended\n", __FUNCTION__));
}

return A_OK;
return 0;
}


Expand Down Expand Up @@ -1240,7 +1240,7 @@ int HIFAttachHTC(HIF_DEVICE *device, HTC_CALLBACKS *callbacks)
return A_ERROR;
}
device->htcCallbacks = *callbacks;
return A_OK;
return 0;
}

void HIFDetachHTC(HIF_DEVICE *device)
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/ath6kl/hif/sdio/linux_sdio/src/hif_scatter.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ int DoHifReadWriteScatter(HIF_DEVICE *device, BUS_REQUEST *busrequest)
struct mmc_data data;
HIF_SCATTER_REQ_PRIV *pReqPriv;
HIF_SCATTER_REQ *pReq;
int status = A_OK;
int status = 0;
struct scatterlist *pSg;

pReqPriv = busrequest->pScatterReq;
Expand Down Expand Up @@ -260,15 +260,15 @@ static int HifReadWriteScatter(HIF_DEVICE *device, HIF_SCATTER_REQ *pReq)
AR_DEBUG_PRINTF(ATH_DEBUG_SCATTER, ("HIF-SCATTER: queued async req: 0x%lX\n", (unsigned long)pReqPriv->busrequest));
/* wake thread, it will process and then take care of the async callback */
up(&device->sem_async);
status = A_OK;
status = 0;
}

} while (false);

if (status && (request & HIF_ASYNCHRONOUS)) {
pReq->CompletionStatus = status;
pReq->CompletionRoutine(pReq);
status = A_OK;
status = 0;
}

return status;
Expand Down Expand Up @@ -344,7 +344,7 @@ int SetupHIFScatterSupport(HIF_DEVICE *device, HIF_DEVICE_SCATTER_SUPPORT_INFO *
pInfo->MaxScatterEntries = MAX_SCATTER_ENTRIES_PER_REQ;
pInfo->MaxTransferSizePerScatterReq = MAX_SCATTER_REQ_TRANSFER_SIZE;

status = A_OK;
status = 0;

} while (false);

Expand Down
Loading

0 comments on commit 4f69cef

Please sign in to comment.