From: Arend van Spriel Date: Wed, 2 Mar 2011 20:18:42 +0000 (+0100) Subject: staging: brcm80211: removed struct osl_info usage from fullmac driver X-Git-Tag: MMI-PSA29.97-13-9~20521^2~324 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8da4a3a03430b9be293f6a427197261de330956a;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git staging: brcm80211: removed struct osl_info usage from fullmac driver Several occurrences in fullmac using struct osl_info could be removed. Reviewed-by: Brett Rudley Reviewed-by: Henry Ptasinski Reviewed-by: Roland Vossen Signed-off-by: Arend van Spriel Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdbus.h b/drivers/staging/brcm80211/brcmfmac/bcmsdbus.h index b020a301341f..99e075b484fb 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdbus.h +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdbus.h @@ -47,7 +47,7 @@ typedef void (*sdioh_cb_fn_t) (void *); * cfghdl points to the starting address of pci device mapped memory */ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *cfghdl, uint irq); -extern SDIOH_API_RC sdioh_detach(struct osl_info *osh, sdioh_info_t *si); +extern SDIOH_API_RC sdioh_detach(sdioh_info_t *si); extern SDIOH_API_RC sdioh_interrupt_register(sdioh_info_t *si, sdioh_cb_fn_t fn, void *argh); extern SDIOH_API_RC sdioh_interrupt_deregister(sdioh_info_t *si); diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c index 77e65e4297a1..22c8f8dc55ef 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh.c @@ -71,7 +71,7 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, bcmsdh->sdioh = sdioh_attach(osh, cfghdl, irq); if (!bcmsdh->sdioh) { - bcmsdh_detach(osh, bcmsdh); + bcmsdh_detach(bcmsdh); return NULL; } @@ -85,13 +85,13 @@ bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, return bcmsdh; } -int bcmsdh_detach(struct osl_info *osh, void *sdh) +int bcmsdh_detach(void *sdh) { bcmsdh_info_t *bcmsdh = (bcmsdh_info_t *) sdh; if (bcmsdh != NULL) { if (bcmsdh->sdioh) { - sdioh_detach(osh, bcmsdh->sdioh); + sdioh_detach(bcmsdh->sdioh); bcmsdh->sdioh = NULL; } kfree(bcmsdh); diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c index deb5f46542ae..1d2d79080eb3 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_linux.c @@ -232,7 +232,7 @@ int bcmsdh_probe(struct device *dev) err: if (sdhc) { if (sdhc->sdh) - bcmsdh_detach(sdhc->osh, sdhc->sdh); + bcmsdh_detach(sdhc->sdh); kfree(sdhc); } if (osh) @@ -250,7 +250,7 @@ int bcmsdh_remove(struct device *dev) sdhc = sdhcinfo; drvinfo.detach(sdhc->ch); - bcmsdh_detach(sdhc->osh, sdhc->sdh); + bcmsdh_detach(sdhc->sdh); /* find the SDIO Host Controller state for this pdev and take it out from the list */ for (sdhc = sdhcinfo, prev = NULL; sdhc; sdhc = sdhc->next) { diff --git a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c index 4409443c69de..9b5075e5bfb1 100644 --- a/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/staging/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -174,7 +174,7 @@ extern sdioh_info_t *sdioh_attach(struct osl_info *osh, void *bar0, uint irq) return sd; } -extern SDIOH_API_RC sdioh_detach(struct osl_info *osh, sdioh_info_t *sd) +extern SDIOH_API_RC sdioh_detach(sdioh_info_t *sd) { sd_trace(("%s\n", __func__)); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h index cd0d5400bf07..065f1aeb6ca9 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_bus.h +++ b/drivers/staging/brcm80211/brcmfmac/dhd_bus.h @@ -27,7 +27,7 @@ extern void dhd_bus_unregister(void); /* Download firmware image and nvram image */ extern bool dhd_bus_download_firmware(struct dhd_bus *bus, - struct osl_info *osh, char *fw_path, char *nv_path); + char *fw_path, char *nv_path); /* Stop bus module: clear pending frames, disable data flow */ extern void dhd_bus_stop(struct dhd_bus *bus, bool enforce_mutex); diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c index 3efc17a0a4e0..50415101e4c7 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_linux.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_linux.c @@ -2125,7 +2125,7 @@ int dhd_bus_start(dhd_pub_t *dhdp) /* try to download image and nvram to the dongle */ if (dhd->pub.busstate == DHD_BUS_DOWN) { - if (!(dhd_bus_download_firmware(dhd->pub.bus, dhd->pub.osh, + if (!(dhd_bus_download_firmware(dhd->pub.bus, fw_path, nv_path))) { DHD_ERROR(("%s: dhdsdio_probe_download failed. " "firmware = %s nvram = %s\n", diff --git a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c index 32551a24b4be..e85d2d216734 100644 --- a/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c +++ b/drivers/staging/brcm80211/brcmfmac/dhd_sdio.c @@ -437,15 +437,14 @@ static int dhdsdio_mem_dump(dhd_bus_t *bus); static int dhdsdio_download_state(dhd_bus_t *bus, bool enter); static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh); -static void dhdsdio_release_malloc(dhd_bus_t *bus, struct osl_info *osh); +static void dhdsdio_release_malloc(dhd_bus_t *bus); static void dhdsdio_disconnect(void *ptr); static bool dhdsdio_chipmatch(u16 chipid); -static bool dhdsdio_probe_attach(dhd_bus_t *bus, struct osl_info *osh, - void *sdh, void *regsva, u16 devid); -static bool dhdsdio_probe_malloc(dhd_bus_t *bus, struct osl_info *osh, - void *sdh); -static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh); -static void dhdsdio_release_dongle(dhd_bus_t *bus, struct osl_info * osh); +static bool dhdsdio_probe_attach(dhd_bus_t *bus, void *sdh, + void *regsva, u16 devid); +static bool dhdsdio_probe_malloc(dhd_bus_t *bus, void *sdh); +static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh); +static void dhdsdio_release_dongle(dhd_bus_t *bus); static uint process_nvram_vars(char *varbuf, uint len); @@ -459,8 +458,7 @@ static int dhd_bcmsdh_send_buf(dhd_bus_t *bus, u32 addr, uint fn, struct sk_buff *pkt, bcmsdh_cmplt_fn_t complete, void *handle); -static bool dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, - void *sdh); +static bool dhdsdio_download_firmware(struct dhd_bus *bus, void *sdh); static int _dhdsdio_download_firmware(struct dhd_bus *bus); static int dhdsdio_download_code_file(struct dhd_bus *bus, char *image_path); @@ -5172,7 +5170,7 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, else use locally malloced rxbuf */ /* attempt to attach to the dongle */ - if (!(dhdsdio_probe_attach(bus, osh, sdh, regsva, devid))) { + if (!(dhdsdio_probe_attach(bus, sdh, regsva, devid))) { DHD_ERROR(("%s: dhdsdio_probe_attach failed\n", __func__)); goto fail; } @@ -5185,12 +5183,12 @@ static void *dhdsdio_probe(u16 venid, u16 devid, u16 bus_no, } /* Allocate buffers */ - if (!(dhdsdio_probe_malloc(bus, osh, sdh))) { + if (!(dhdsdio_probe_malloc(bus, sdh))) { DHD_ERROR(("%s: dhdsdio_probe_malloc failed\n", __func__)); goto fail; } - if (!(dhdsdio_probe_init(bus, osh, sdh))) { + if (!(dhdsdio_probe_init(bus, sdh))) { DHD_ERROR(("%s: dhdsdio_probe_init failed\n", __func__)); goto fail; } @@ -5231,8 +5229,7 @@ fail: } static bool -dhdsdio_probe_attach(struct dhd_bus *bus, struct osl_info *osh, void *sdh, - void *regsva, u16 devid) +dhdsdio_probe_attach(struct dhd_bus *bus, void *sdh, void *regsva, u16 devid) { u8 clkctl = 0; int err = 0; @@ -5389,8 +5386,7 @@ fail: return false; } -static bool dhdsdio_probe_malloc(dhd_bus_t *bus, struct osl_info *osh, - void *sdh) +static bool dhdsdio_probe_malloc(dhd_bus_t *bus, void *sdh) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -5431,7 +5427,7 @@ fail: return false; } -static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh) +static bool dhdsdio_probe_init(dhd_bus_t *bus, void *sdh) { s32 fnum; @@ -5508,20 +5504,19 @@ static bool dhdsdio_probe_init(dhd_bus_t *bus, struct osl_info *osh, void *sdh) } bool -dhd_bus_download_firmware(struct dhd_bus *bus, struct osl_info *osh, - char *fw_path, char *nv_path) +dhd_bus_download_firmware(struct dhd_bus *bus, char *fw_path, char *nv_path) { bool ret; bus->fw_path = fw_path; bus->nv_path = nv_path; - ret = dhdsdio_download_firmware(bus, osh, bus->sdh); + ret = dhdsdio_download_firmware(bus, bus->sdh); return ret; } static bool -dhdsdio_download_firmware(struct dhd_bus *bus, struct osl_info *osh, void *sdh) +dhdsdio_download_firmware(struct dhd_bus *bus, void *sdh) { bool ret; @@ -5541,21 +5536,19 @@ static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh) DHD_TRACE(("%s: Enter\n", __func__)); if (bus) { - ASSERT(osh); - /* De-register interrupt handler */ bcmsdh_intr_disable(bus->sdh); bcmsdh_intr_dereg(bus->sdh); if (bus->dhd) { - dhdsdio_release_dongle(bus, osh); + dhdsdio_release_dongle(bus); dhd_detach(bus->dhd); bus->dhd = NULL; } - dhdsdio_release_malloc(bus, osh); + dhdsdio_release_malloc(bus); kfree(bus); } @@ -5566,7 +5559,7 @@ static void dhdsdio_release(dhd_bus_t *bus, struct osl_info *osh) DHD_TRACE(("%s: Disconnected\n", __func__)); } -static void dhdsdio_release_malloc(dhd_bus_t *bus, struct osl_info *osh) +static void dhdsdio_release_malloc(dhd_bus_t *bus) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -5585,7 +5578,7 @@ static void dhdsdio_release_malloc(dhd_bus_t *bus, struct osl_info *osh) } } -static void dhdsdio_release_dongle(dhd_bus_t *bus, struct osl_info *osh) +static void dhdsdio_release_dongle(dhd_bus_t *bus) { DHD_TRACE(("%s: Enter\n", __func__)); @@ -6057,7 +6050,7 @@ int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag) /* Clean tx/rx buffer pointers, detach from the dongle */ - dhdsdio_release_dongle(bus, bus->dhd->osh); + dhdsdio_release_dongle(bus); bus->dhd->dongle_reset = true; bus->dhd->up = false; @@ -6077,14 +6070,13 @@ int dhd_bus_devreset(dhd_pub_t *dhdp, u8 flag) bcmsdh_reset(bus->sdh); /* Attempt to re-attach & download */ - if (dhdsdio_probe_attach(bus, bus->dhd->osh, bus->sdh, + if (dhdsdio_probe_attach(bus, bus->sdh, (u32 *) SI_ENUM_BASE, bus->cl_devid)) { /* Attempt to download binary to the dongle */ if (dhdsdio_probe_init - (bus, bus->dhd->osh, bus->sdh) + (bus, bus->sdh) && dhdsdio_download_firmware(bus, - bus->dhd->osh, bus->sdh)) { /* Re-init bus, enable F2 transfer */ diff --git a/drivers/staging/brcm80211/include/bcmsdh.h b/drivers/staging/brcm80211/include/bcmsdh.h index 96c629267f14..d27d1cbb7f79 100644 --- a/drivers/staging/brcm80211/include/bcmsdh.h +++ b/drivers/staging/brcm80211/include/bcmsdh.h @@ -53,7 +53,7 @@ extern bcmsdh_info_t *bcmsdh_attach(struct osl_info *osh, void *cfghdl, void **regsva, uint irq); /* Detach - freeup resources allocated in attach */ -extern int bcmsdh_detach(struct osl_info *osh, void *sdh); +extern int bcmsdh_detach(void *sdh); /* Query if SD device interrupts are enabled */ extern bool bcmsdh_intr_query(void *sdh);