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

brcm80211: fmac: move module init/exit to sdio layer

This patch is part of the fullmac bus interface refactoring series.
It moves the module init/exit code to bus layer.
Reviewed-by: default avatarPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: default avatarAlwin Beukers <alwin@broadcom.com>
Reviewed-by: default avatarArend van Spriel <arend@broadcom.com>
Signed-off-by: default avatarFranky Lin <frankyl@broadcom.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent 0c094c77
...@@ -577,17 +577,26 @@ static struct sdio_driver brcmf_sdmmc_driver = { ...@@ -577,17 +577,26 @@ static struct sdio_driver brcmf_sdmmc_driver = {
#endif /* CONFIG_PM_SLEEP */ #endif /* CONFIG_PM_SLEEP */
}; };
/* bus register interface */ static void __exit brcmf_sdio_exit(void)
int brcmf_bus_register(void)
{ {
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
return sdio_register_driver(&brcmf_sdmmc_driver); sdio_unregister_driver(&brcmf_sdmmc_driver);
} }
void brcmf_bus_unregister(void) static int __init brcmf_sdio_init(void)
{ {
int ret;
brcmf_dbg(TRACE, "Enter\n"); brcmf_dbg(TRACE, "Enter\n");
sdio_unregister_driver(&brcmf_sdmmc_driver); ret = sdio_register_driver(&brcmf_sdmmc_driver);
if (ret)
brcmf_dbg(ERROR, "sdio_register_driver failed: %d\n", ret);
return ret;
} }
module_init(brcmf_sdio_init);
module_exit(brcmf_sdio_exit);
...@@ -27,10 +27,6 @@ ...@@ -27,10 +27,6 @@
* Exported from brcmf bus module (brcmf_usb, brcmf_sdio) * Exported from brcmf bus module (brcmf_usb, brcmf_sdio)
*/ */
/* Indicate (dis)interest in finding dongles. */
extern int brcmf_bus_register(void);
extern void brcmf_bus_unregister(void);
/* obtain linux device object providing bus function */ /* obtain linux device object providing bus function */
extern struct device *brcmf_bus_get_device(struct brcmf_bus *bus); extern struct device *brcmf_bus_get_device(struct brcmf_bus *bus);
......
...@@ -1147,34 +1147,6 @@ void brcmf_detach(struct brcmf_pub *drvr) ...@@ -1147,34 +1147,6 @@ void brcmf_detach(struct brcmf_pub *drvr)
} }
} }
static void __exit brcmf_module_cleanup(void)
{
brcmf_dbg(TRACE, "Enter\n");
brcmf_bus_unregister();
}
static int __init brcmf_module_init(void)
{
int error;
brcmf_dbg(TRACE, "Enter\n");
error = brcmf_bus_register();
if (error) {
brcmf_dbg(ERROR, "brcmf_bus_register failed\n");
goto failed;
}
return 0;
failed:
return -EINVAL;
}
module_init(brcmf_module_init);
module_exit(brcmf_module_cleanup);
int brcmf_os_proto_block(struct brcmf_pub *drvr) int brcmf_os_proto_block(struct brcmf_pub *drvr)
{ {
struct brcmf_info *drvr_priv = drvr->info; struct brcmf_info *drvr_priv = drvr->info;
......
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