static void brcmf_ops_sdio_remove(struct sdio_func *func) { struct brcmf_bus *bus_if; struct brcmf_sdio_dev *sdiodev; brcmf_dbg(SDIO, "Enter\n"); brcmf_dbg(SDIO, "sdio vendor ID: 0x%04x\n", func->vendor); brcmf_dbg(SDIO, "sdio device ID: 0x%04x\n", func->device); brcmf_dbg(SDIO, "Function: %d\n", func->num); if (func->num != 1 && func->num != 2) return; bus_if = dev_get_drvdata(&func->dev); if (bus_if) { sdiodev = bus_if->bus_priv.sdio; brcmf_sdio_remove(sdiodev); dev_set_drvdata(&sdiodev->func[1]->dev, NULL); dev_set_drvdata(&sdiodev->func[2]->dev, NULL); kfree(bus_if); kfree(sdiodev); } brcmf_dbg(SDIO, "Exit\n"); }
static void brcmf_ops_sdio_remove(struct sdio_func *func) { struct brcmf_sdio_dev *sdiodev; brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(INFO, "func->class=%x\n", func->class); brcmf_dbg(INFO, "sdio_vendor: 0x%04x\n", func->vendor); brcmf_dbg(INFO, "sdio_device: 0x%04x\n", func->device); brcmf_dbg(INFO, "Function#: 0x%04x\n", func->num); if (func->num == 2) { sdiodev = dev_get_drvdata(&func->card->dev); brcmf_dbg(TRACE, "F2 found, calling brcmf_sdio_remove...\n"); brcmf_sdio_remove(sdiodev); dev_set_drvdata(&func->card->dev, NULL); kfree(sdiodev); } }