Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 249285
b: refs/heads/master
c: b7ef2a9
h: refs/heads/master
i:
  249283: b0539ed
v: v3
  • Loading branch information
Roland Vossen authored and Greg Kroah-Hartman committed May 3, 2011
1 parent b768f2e commit 000feae
Show file tree
Hide file tree
Showing 21 changed files with 345 additions and 343 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 745492c254c8cd202632c3f8f92a896c5037e249
refs/heads/master: b7ef2a9590479efc45e3acf3b193174da26aa561
32 changes: 16 additions & 16 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ int bcmsdh_intr_enable(void *sdh)
ASSERT(bcmsdh);

status = sdioh_interrupt_set(bcmsdh->sdioh, true);
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

int bcmsdh_intr_disable(void *sdh)
Expand All @@ -136,7 +136,7 @@ int bcmsdh_intr_disable(void *sdh)
ASSERT(bcmsdh);

status = sdioh_interrupt_set(bcmsdh->sdioh, false);
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

int bcmsdh_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
Expand All @@ -146,7 +146,7 @@ int bcmsdh_intr_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
ASSERT(bcmsdh);

status = sdioh_interrupt_register(bcmsdh->sdioh, fn, argh);
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

int bcmsdh_intr_dereg(void *sdh)
Expand All @@ -156,7 +156,7 @@ int bcmsdh_intr_dereg(void *sdh)
ASSERT(bcmsdh);

status = sdioh_interrupt_deregister(bcmsdh->sdioh);
return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

#if defined(DHD_DEBUG)
Expand All @@ -174,7 +174,7 @@ int bcmsdh_devremove_reg(void *sdh, bcmsdh_cb_fn_t fn, void *argh)
ASSERT(sdh);

/* don't support yet */
return BCME_UNSUPPORTED;
return -BCME_UNSUPPORTED;
}

u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
Expand Down Expand Up @@ -204,7 +204,7 @@ u8 bcmsdh_cfg_read(void *sdh, uint fnc_num, u32 addr, int *err)
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
#endif
if (err)
*err = (SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR);
*err = (SDIOH_API_SUCCESS(status) ? 0 : -BCME_SDIO_ERROR);

BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u8data = 0x%x\n",
__func__, fnc_num, addr, data));
Expand Down Expand Up @@ -239,7 +239,7 @@ bcmsdh_cfg_write(void *sdh, uint fnc_num, u32 addr, u8 data, int *err)
&& (retry++ < SDIOH_API_ACCESS_RETRY_LIMIT));
#endif
if (err)
*err = SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR;
*err = SDIOH_API_SUCCESS(status) ? 0 : -BCME_SDIO_ERROR;

BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u8data = 0x%x\n",
__func__, fnc_num, addr, data));
Expand All @@ -261,7 +261,7 @@ u32 bcmsdh_cfg_read_word(void *sdh, uint fnc_num, u32 addr, int *err)
fnc_num, addr, &data, 4);

if (err)
*err = (SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR);
*err = (SDIOH_API_SUCCESS(status) ? 0 : -BCME_SDIO_ERROR);

BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u32data = 0x%x\n",
__func__, fnc_num, addr, data));
Expand All @@ -286,7 +286,7 @@ bcmsdh_cfg_write_word(void *sdh, uint fnc_num, u32 addr, u32 data,
SDIOH_WRITE, fnc_num, addr, &data, 4);

if (err)
*err = (SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR);
*err = (SDIOH_API_SUCCESS(status) ? 0 : -BCME_SDIO_ERROR);

BCMSDH_INFO(("%s:fun = %d, addr = 0x%x, u32data = 0x%x\n",
__func__, fnc_num, addr, data));
Expand Down Expand Up @@ -317,7 +317,7 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
tmp_buf = kmalloc(length, GFP_ATOMIC);
if (tmp_buf == NULL) {
BCMSDH_ERROR(("%s: out of memory\n", __func__));
return BCME_NOMEM;
return -BCME_NOMEM;
}
memcpy(tmp_buf, cis, length);
for (tmp_ptr = tmp_buf, ptr = cis; ptr < (cis + length - 4);
Expand All @@ -329,7 +329,7 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
kfree(tmp_buf);
}

return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

static int bcmsdhsdio_set_sbaddr_window(void *sdh, u32 address)
Expand Down Expand Up @@ -467,7 +467,7 @@ bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags,
/* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC)
return BCME_UNSUPPORTED;
return -BCME_UNSUPPORTED;

if (bar0 != bcmsdh->sbwad) {
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
Expand All @@ -488,7 +488,7 @@ bcmsdh_recv_buf(void *sdh, u32 addr, uint fn, uint flags,
SDIOH_READ, fn, addr, width, nbytes, buf,
pkt);

return SDIOH_API_SUCCESS(status) ? 0 : BCME_SDIO_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_SDIO_ERROR;
}

int
Expand All @@ -512,7 +512,7 @@ bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
/* Async not implemented yet */
ASSERT(!(flags & SDIO_REQ_ASYNC));
if (flags & SDIO_REQ_ASYNC)
return BCME_UNSUPPORTED;
return -BCME_UNSUPPORTED;

if (bar0 != bcmsdh->sbwad) {
err = bcmsdhsdio_set_sbaddr_window(bcmsdh, bar0);
Expand All @@ -533,7 +533,7 @@ bcmsdh_send_buf(void *sdh, u32 addr, uint fn, uint flags,
SDIOH_WRITE, fn, addr, width, nbytes, buf,
pkt);

return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

int bcmsdh_rwdata(void *sdh, uint rw, u32 addr, u8 *buf, uint nbytes)
Expand All @@ -553,7 +553,7 @@ int bcmsdh_rwdata(void *sdh, uint rw, u32 addr, u8 *buf, uint nbytes)
(rw ? SDIOH_WRITE : SDIOH_READ), SDIO_FUNC_1,
addr, 4, nbytes, buf, NULL);

return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
return SDIOH_API_SUCCESS(status) ? 0 : -BCME_ERROR;
}

int bcmsdh_abort(void *sdh, uint fn)
Expand Down
18 changes: 9 additions & 9 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

vi = bcm_iovar_lookup(sdioh_iovars, name);
if (vi == NULL) {
bcmerror = BCME_UNSUPPORTED;
bcmerror = -BCME_UNSUPPORTED;
goto exit;
}

Expand Down Expand Up @@ -472,7 +472,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

case IOV_GVAL(IOV_BLOCKSIZE):
if ((u32) int_val > si->num_funcs) {
bcmerror = BCME_BADARG;
bcmerror = -BCME_BADARG;
break;
}
int_val = (s32) si->client_block_size[int_val];
Expand All @@ -486,7 +486,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
uint maxsize;

if (func > si->num_funcs) {
bcmerror = BCME_BADARG;
bcmerror = -BCME_BADARG;
break;
}

Expand All @@ -504,7 +504,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
maxsize = 0;
}
if (blksize > maxsize) {
bcmerror = BCME_BADARG;
bcmerror = -BCME_BADARG;
break;
}
if (!blksize)
Expand Down Expand Up @@ -607,7 +607,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|| sd_ptr->offset > SD_MaxCurCap) {
sd_err(("%s: bad offset 0x%x\n", __func__,
sd_ptr->offset));
bcmerror = BCME_BADARG;
bcmerror = -BCME_BADARG;
break;
}

Expand Down Expand Up @@ -637,7 +637,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,
|| sd_ptr->offset > SD_MaxCurCap) {
sd_err(("%s: bad offset 0x%x\n", __func__,
sd_ptr->offset));
bcmerror = BCME_BADARG;
bcmerror = -BCME_BADARG;
break;
}

Expand All @@ -656,7 +656,7 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

if (sdioh_cfg_read
(si, sd_ptr->func, sd_ptr->offset, &data)) {
bcmerror = BCME_SDIO_ERROR;
bcmerror = -BCME_SDIO_ERROR;
break;
}

Expand All @@ -672,14 +672,14 @@ sdioh_iovar_op(sdioh_info_t *si, const char *name,

if (sdioh_cfg_write
(si, sd_ptr->func, sd_ptr->offset, &data)) {
bcmerror = BCME_SDIO_ERROR;
bcmerror = -BCME_SDIO_ERROR;
break;
}
break;
}

default:
bcmerror = BCME_UNSUPPORTED;
bcmerror = -BCME_UNSUPPORTED;
break;
}
exit:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ int sdioh_sdmmc_osinit(sdioh_info_t *sd)
sdos = kmalloc(sizeof(struct sdos_info), GFP_ATOMIC);
sd->sdos_info = (void *)sdos;
if (sdos == NULL)
return BCME_NOMEM;
return -BCME_NOMEM;

sdos->sd = sd;
spin_lock_init(&sdos->lock);
Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ int
dhd_prot_iovar_op(dhd_pub_t *dhdp, const char *name,
void *params, int plen, void *arg, int len, bool set)
{
return BCME_UNSUPPORTED;
return -BCME_UNSUPPORTED;
}

void dhd_prot_dump(dhd_pub_t *dhdp, struct bcmstrbuf *strbuf)
Expand Down Expand Up @@ -357,7 +357,7 @@ int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, struct sk_buff *pktbuf)
if (pktbuf->len < BDC_HEADER_LEN) {
DHD_ERROR(("%s: rx data too short (%d < %d)\n", __func__,
pktbuf->len, BDC_HEADER_LEN));
return BCME_ERROR;
return -BCME_ERROR;
}

h = (struct bdc_header *)(pktbuf->data);
Expand All @@ -366,14 +366,14 @@ int dhd_prot_hdrpull(dhd_pub_t *dhd, int *ifidx, struct sk_buff *pktbuf)
if (*ifidx >= DHD_MAX_IFS) {
DHD_ERROR(("%s: rx data ifnum out of range (%d)\n",
__func__, *ifidx));
return BCME_ERROR;
return -BCME_ERROR;
}

if (((h->flags & BDC_FLAG_VER_MASK) >> BDC_FLAG_VER_SHIFT) !=
BDC_PROTO_VER) {
DHD_ERROR(("%s: non-BDC packet received, flags 0x%x\n",
dhd_ifname(dhd, *ifidx), h->flags));
return BCME_ERROR;
return -BCME_ERROR;
}

if (h->flags & BDC_FLAG_SUM_GOOD) {
Expand Down Expand Up @@ -416,7 +416,7 @@ int dhd_prot_attach(dhd_pub_t *dhd)

fail:
kfree(cdc);
return BCME_NOMEM;
return -BCME_NOMEM;
}

/* ~NOTE~ What if another thread is waiting on the semaphore? Holding it? */
Expand Down
Loading

0 comments on commit 000feae

Please sign in to comment.