Commit a8a6c045 authored by Franky Lin's avatar Franky Lin Committed by John W. Linville

brcm80211: fmac: move chip detach function to sdio_chip.c

This patch is part of the abstracting chip backplane handle code
series.
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 2bc78e10
...@@ -3967,15 +3967,6 @@ brcmf_sdbrcm_watchdog(unsigned long data) ...@@ -3967,15 +3967,6 @@ brcmf_sdbrcm_watchdog(unsigned long data)
} }
} }
static void
brcmf_sdbrcm_chip_detach(struct brcmf_bus *bus)
{
brcmf_dbg(TRACE, "Enter\n");
kfree(bus->ci);
bus->ci = NULL;
}
static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus) static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus)
{ {
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
...@@ -3983,7 +3974,7 @@ static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus) ...@@ -3983,7 +3974,7 @@ static void brcmf_sdbrcm_release_dongle(struct brcmf_bus *bus)
if (bus->ci) { if (bus->ci) {
brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false); brcmf_sdbrcm_clkctl(bus, CLK_AVAIL, false);
brcmf_sdbrcm_clkctl(bus, CLK_NONE, false); brcmf_sdbrcm_clkctl(bus, CLK_NONE, false);
brcmf_sdbrcm_chip_detach(bus); brcmf_sdio_chip_detach(&bus->ci);
if (bus->vars && bus->varsz) if (bus->vars && bus->varsz)
kfree(bus->vars); kfree(bus->vars);
bus->vars = NULL; bus->vars = NULL;
......
...@@ -354,3 +354,12 @@ int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev, ...@@ -354,3 +354,12 @@ int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
kfree(ci); kfree(ci);
return ret; return ret;
} }
void
brcmf_sdio_chip_detach(struct chip_info **ci_ptr)
{
brcmf_dbg(TRACE, "Enter\n");
kfree(*ci_ptr);
*ci_ptr = NULL;
}
...@@ -141,5 +141,6 @@ extern void brcmf_sdio_chip_coredisable(struct brcmf_sdio_dev *sdiodev, ...@@ -141,5 +141,6 @@ extern void brcmf_sdio_chip_coredisable(struct brcmf_sdio_dev *sdiodev,
u32 corebase); u32 corebase);
extern int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev, extern int brcmf_sdio_chip_attach(struct brcmf_sdio_dev *sdiodev,
struct chip_info **ci_ptr, u32 regs); struct chip_info **ci_ptr, u32 regs);
extern void brcmf_sdio_chip_detach(struct chip_info **ci_ptr);
#endif /* _BRCMFMAC_SDIO_CHIP_H_ */ #endif /* _BRCMFMAC_SDIO_CHIP_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment