Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 220336
b: refs/heads/master
c: 182acb3
h: refs/heads/master
v: v3
  • Loading branch information
mike.rapoport@gmail.com authored and Greg Kroah-Hartman committed Oct 14, 2010
1 parent efcc440 commit f9c237a
Show file tree
Hide file tree
Showing 29 changed files with 116 additions and 146 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: 199d217c52dcc961dfd5928e5cbc32cc8a9140d9
refs/heads/master: 182acb3ca59ba2d31485f7225177c069cebdc161
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int bcmsdh_detach(osl_t *osh, void *sdh)
sdioh_detach(osh, bcmsdh->sdioh);
bcmsdh->sdioh = NULL;
}
MFREE(osh, bcmsdh, sizeof(bcmsdh_info_t));
kfree(bcmsdh);
}

l_bcmsdh = NULL;
Expand Down Expand Up @@ -328,7 +328,7 @@ int bcmsdh_cis_read(void *sdh, uint func, u8 * cis, uint length)
if ((((tmp_ptr - tmp_buf) + 1) & 0xf) == 0)
ptr += sprintf((char *)ptr, "\n");
}
MFREE(bcmsdh->osh, tmp_buf, length);
kfree(tmp_buf);
}

return SDIOH_API_SUCCESS(status) ? 0 : BCME_ERROR;
Expand Down
8 changes: 4 additions & 4 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ int bcmsdh_probe(struct device *dev)
if (sdhc) {
if (sdhc->sdh)
bcmsdh_detach(sdhc->osh, sdhc->sdh);
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
kfree(sdhc);
}
if (osh)
osl_detach(osh);
Expand Down Expand Up @@ -283,7 +283,7 @@ int bcmsdh_remove(struct device *dev)

/* release SDIO Host Controller info */
osh = sdhc->osh;
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
kfree(sdhc);
osl_detach(osh);

#if !defined(BCMLXSDMMC)
Expand Down Expand Up @@ -471,7 +471,7 @@ bcmsdh_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent)
if (sdhc->sdh)
bcmsdh_detach(sdhc->osh, sdhc->sdh);
if (sdhc)
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
kfree(sdhc);
if (osh)
osl_detach(osh);
return -ENODEV;
Expand Down Expand Up @@ -506,7 +506,7 @@ static void __devexit bcmsdh_pci_remove(struct pci_dev *pdev)

/* release SDIO Host Controller info */
osh = sdhc->osh;
MFREE(osh, sdhc, sizeof(bcmsdh_hc_t));
kfree(sdhc);
osl_detach(osh);
}
#endif /* BCMLXSDMMC */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ extern sdioh_info_t *sdioh_attach(osl_t *osh, void *bar0, uint irq)
sd->osh = osh;
if (sdioh_sdmmc_osinit(sd) != 0) {
sd_err(("%s:sdioh_sdmmc_osinit() failed\n", __func__));
MFREE(sd->osh, sd, sizeof(sdioh_info_t));
kfree(sd);
return NULL;
}

Expand Down Expand Up @@ -193,7 +193,7 @@ extern SDIOH_API_RC sdioh_detach(osl_t *osh, sdioh_info_t *sd)
/* deregister irq */
sdioh_sdmmc_osfree(sd);

MFREE(sd->osh, sd, sizeof(sdioh_info_t));
kfree(sd);
}
return SDIOH_API_RC_SUCCESS;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ void sdioh_sdmmc_osfree(sdioh_info_t *sd)
ASSERT(sd && sd->sdos_info);

sdos = (struct sdos_info *)sd->sdos_info;
MFREE(sd->osh, sdos, sizeof(struct sdos_info));
kfree(sdos);
}

/* Interrupt enable/disable */
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_cdc.c
Original file line number Diff line number Diff line change
Expand Up @@ -427,14 +427,14 @@ int dhd_prot_attach(dhd_pub_t *dhd)

fail:
if (cdc != NULL)
MFREE(dhd->osh, cdc, sizeof(dhd_prot_t));
kfree(cdc);
return BCME_NOMEM;
}

/* ~NOTE~ What if another thread is waiting on the semaphore? Holding it? */
void dhd_prot_detach(dhd_pub_t *dhd)
{
MFREE(dhd->osh, dhd->prot, sizeof(dhd_prot_t));
kfree(dhd->prot);
dhd->prot = NULL;
}

Expand Down
10 changes: 5 additions & 5 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,7 @@ dhd_pktfilter_offload_enable(dhd_pub_t *dhd, char *arg, int enable,

fail:
if (arg_org)
MFREE(dhd->osh, arg_org, strlen(arg) + 1);
kfree(arg_org);
}

void dhd_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)
Expand Down Expand Up @@ -1188,10 +1188,10 @@ void dhd_pktfilter_offload_set(dhd_pub_t *dhd, char *arg)

fail:
if (arg_org)
MFREE(dhd->osh, arg_org, strlen(arg) + 1);
kfree(arg_org);

if (buf)
MFREE(dhd->osh, buf, BUF_SIZE);
kfree(buf);
}

void dhd_arp_offload_set(dhd_pub_t *dhd, int arp_mode)
Expand Down Expand Up @@ -1406,7 +1406,7 @@ void dhd_iscan_free_buf(void *dhdp, iscan_buf_t *iscan_delete)
iscanbuf_free = iscanbuf_cur;
iscanbuf_cur = iscanbuf_cur->next;
iscanbuf_free->next = 0;
MFREE(dhd->osh, iscanbuf_free, sizeof(iscan_buf_t));
kfree(iscanbuf_free);
}
iscan_chain = 0;
} else {
Expand All @@ -1420,7 +1420,7 @@ void dhd_iscan_free_buf(void *dhdp, iscan_buf_t *iscan_delete)
iscanbuf_prv->next = iscan_delete->next;

iscan_delete->next = 0;
MFREE(dhd->osh, iscan_delete, sizeof(iscan_buf_t));
kfree(iscan_delete);

if (!iscanbuf_prv)
iscan_chain = 0;
Expand Down
16 changes: 8 additions & 8 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -747,7 +747,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
allmulti = cnt ? true : allmulti;
}

MFREE(dhd->pub.osh, buf, buflen);
kfree(buf);

/* Now send the allmulti setting. This is based on the setting in the
* net_device flags, but might be modified above to be turned on if we
Expand All @@ -768,7 +768,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
DHD_ERROR(("%s: mkiovar failed for allmulti, datalen %d "
"buflen %u\n", dhd_ifname(&dhd->pub, ifidx),
(int)sizeof(allmulti), buflen));
MFREE(dhd->pub.osh, buf, buflen);
kfree(buf);
return;
}

Expand All @@ -784,7 +784,7 @@ static void _dhd_set_multicast_list(dhd_info_t *dhd, int ifidx)
dhd_ifname(&dhd->pub, ifidx), ltoh32(allmulti)));
}

MFREE(dhd->pub.osh, buf, buflen);
kfree(buf);

/* Finally, pick up the PROMISC flag as well, like the NIC
driver does */
Expand Down Expand Up @@ -921,7 +921,7 @@ static void dhd_op_if(dhd_if_t *ifp)
free_netdev(ifp->net);

dhd->iflist[ifp->idx] = NULL;
MFREE(dhd->pub.osh, ifp, sizeof(*ifp));
kfree(ifp);
#ifdef SOFTAP
if (ifp->net == ap_net_dev)
ap_net_dev = NULL; /* NULL SOFTAP global
Expand Down Expand Up @@ -1746,7 +1746,7 @@ static int dhd_ioctl_entry(struct net_device *net, struct ifreq *ifr, int cmd)
}

if (buf)
MFREE(dhd->pub.osh, buf, buflen);
kfree(buf);

return OSL_ERROR(bcmerror);
}
Expand Down Expand Up @@ -2374,8 +2374,8 @@ void dhd_detach(dhd_pub_t *dhdp)
WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_LINK_DOWN_TMOUT);
WAKE_LOCK_DESTROY(dhdp, WAKE_LOCK_PNO_FIND_TMOUT);
free_netdev(ifp->net);
MFREE(dhd->pub.osh, ifp, sizeof(*ifp));
MFREE(dhd->pub.osh, dhd, sizeof(*dhd));
kfree(ifp);
kfree(dhd);
}
}
}
Expand Down Expand Up @@ -2923,7 +2923,7 @@ int write_to_file(dhd_pub_t *dhd, u8 *buf, int size)

exit:
/* free buf before return */
MFREE(dhd->osh, buf, size);
kfree(buf);
/* close file before return */
if (fp)
filp_close(fp, current->files);
Expand Down
32 changes: 16 additions & 16 deletions trunk/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -1927,9 +1927,9 @@ static int dhdsdio_checkdied(dhd_bus_t *bus, u8 *data, uint size)

done:
if (mbuffer)
MFREE(bus->dhd->osh, mbuffer, msize);
kfree(mbuffer);
if (str)
MFREE(bus->dhd->osh, str, maxstrlen);
kfree(str);

return bcmerror;
}
Expand Down Expand Up @@ -1959,7 +1959,7 @@ static int dhdsdio_mem_dump(dhd_bus_t *bus)
if (ret) {
printf("%s: Error membytes %d\n", __func__, ret);
if (buf)
MFREE(bus->dhd->osh, buf, size);
kfree(buf);
return -1;
}
printf(".");
Expand Down Expand Up @@ -2078,7 +2078,7 @@ int dhdsdio_downloadvars(dhd_bus_t *bus, void *arg, int len)

/* Free the old ones and replace with passed variables */
if (bus->vars)
MFREE(bus->dhd->osh, bus->vars, bus->varsz);
kfree(bus->vars);

bus->vars = kmalloc(len, GFP_ATOMIC);
bus->varsz = bus->vars ? len : 0;
Expand Down Expand Up @@ -2562,10 +2562,10 @@ static int dhdsdio_write_vars(dhd_bus_t *bus)
DHD_ERROR(("%s: Download/Upload/Compare of NVRAM ok.\n",
__func__));

MFREE(bus->dhd->osh, nvram_ularray, varsize);
kfree(nvram_ularray);
#endif /* DHD_DEBUG */

MFREE(bus->dhd->osh, vbuffer, varsize);
kfree(vbuffer);
}

/* adjust to the user specified RAM */
Expand Down Expand Up @@ -5286,15 +5286,15 @@ dhdsdio_probe_attach(struct dhd_bus *bus, osl_t *osh, void *sdh, void *regsva,
if (err) {
DHD_INFO(("dhdsdio_probe: fn %d cis read "
"err %d\n", fn, err));
MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
kfree(cis[fn]);
break;
}
dhd_dump_cis(fn, cis[fn]);
}

while (fn-- > 0) {
ASSERT(cis[fn]);
MFREE(osh, cis[fn], SBSDIO_CIS_SIZE_LIMIT);
kfree(cis[fn]);
}

if (err) {
Expand Down Expand Up @@ -5400,7 +5400,7 @@ static bool dhdsdio_probe_malloc(dhd_bus_t *bus, osl_t *osh, void *sdh)
__func__, MAX_DATA_BUF));
/* release rxbuf which was already located as above */
if (!bus->rxblen)
MFREE(osh, bus->rxbuf, bus->rxblen);
kfree(bus->rxbuf);
goto fail;
}

Expand Down Expand Up @@ -5544,7 +5544,7 @@ static void dhdsdio_release(dhd_bus_t *bus, osl_t *osh)

dhdsdio_release_malloc(bus, osh);

MFREE(osh, bus, sizeof(dhd_bus_t));
kfree(bus);
}

if (osh)
Expand All @@ -5561,13 +5561,13 @@ static void dhdsdio_release_malloc(dhd_bus_t *bus, osl_t *osh)
return;

if (bus->rxbuf) {
MFREE(osh, bus->rxbuf, bus->rxblen);
kfree(bus->rxbuf);
bus->rxctl = bus->rxbuf = NULL;
bus->rxlen = 0;
}

if (bus->databuf) {
MFREE(osh, bus->databuf, MAX_DATA_BUF);
kfree(bus->databuf);
bus->databuf = NULL;
}
}
Expand All @@ -5587,7 +5587,7 @@ static void dhdsdio_release_dongle(dhd_bus_t *bus, osl_t *osh)
dhdsdio_clkctl(bus, CLK_NONE, false);
si_detach(bus->sih);
if (bus->vars && bus->varsz)
MFREE(osh, bus->vars, bus->varsz);
kfree(bus->vars);
bus->vars = NULL;
}

Expand Down Expand Up @@ -5710,7 +5710,7 @@ static int dhdsdio_download_code_array(struct dhd_bus *bus)
DHD_ERROR(("%s: Download/Upload/Compare succeeded.\n",
__func__));

MFREE(bus->dhd->osh, ularray, bus->ramsize);
kfree(ularray);
}
#endif /* DHD_DEBUG */

Expand Down Expand Up @@ -5758,7 +5758,7 @@ static int dhdsdio_download_code_file(struct dhd_bus *bus, char *fw_path)

err:
if (memblock)
MFREE(bus->dhd->osh, memblock, MEMBLOCK + DHD_SDALIGN);
kfree(memblock);

if (image)
dhd_os_close_image(image);
Expand Down Expand Up @@ -5898,7 +5898,7 @@ static int dhdsdio_download_nvram(struct dhd_bus *bus)

err:
if (memblock)
MFREE(bus->dhd->osh, memblock, MEMBLOCK);
kfree(memblock);

if (image)
dhd_os_close_image(image);
Expand Down
3 changes: 0 additions & 3 deletions trunk/drivers/staging/brcm80211/include/linux_osl.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ typedef struct {

#define BUS_SWAP32(v) (v)

#define MFREE(osh, addr, size) osl_mfree((osh), (addr), (size))
extern void osl_mfree(osl_t *osh, void *addr, uint size);

#define DMA_CONSISTENT_ALIGN osl_dma_consistent_align()
extern uint osl_dma_consistent_align(void);
extern void *osl_dma_alloc_consistent(osl_t *osh, uint size, u16 align,
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/staging/brcm80211/phy/wlc_phy_cmn.c
Original file line number Diff line number Diff line change
Expand Up @@ -599,7 +599,7 @@ void wlc_phy_shared_detach(shared_phy_t *phy_sh)
if (phy_sh->phy_head) {
ASSERT(!phy_sh->phy_head);
}
MFREE(osh, phy_sh, sizeof(shared_phy_t));
kfree(phy_sh);
}
}

Expand Down Expand Up @@ -780,7 +780,7 @@ wlc_phy_t *wlc_phy_attach(shared_phy_t *sh, void *regs, int bandtype, char *vars

err:
if (pi)
MFREE(sh->osh, pi, sizeof(phy_info_t));
kfree(pi);
return NULL;
}

Expand Down Expand Up @@ -808,7 +808,7 @@ void wlc_phy_detach(wlc_phy_t *pih)
if (pi->pi_fptr.detach)
(pi->pi_fptr.detach) (pi);

MFREE(pi->sh->osh, pi, sizeof(phy_info_t));
kfree(pi);
}
}

Expand Down
Loading

0 comments on commit f9c237a

Please sign in to comment.