提交 3392c888 编写于 作者: F Franky Lin 提交者: 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: NPieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: NAlwin Beukers <alwin@broadcom.com>
Reviewed-by: NArend van Spriel <arend@broadcom.com>
Signed-off-by: NFranky Lin <frankyl@broadcom.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
上级 0c094c77
......@@ -577,17 +577,26 @@ static struct sdio_driver brcmf_sdmmc_driver = {
#endif /* CONFIG_PM_SLEEP */
};
/* bus register interface */
int brcmf_bus_register(void)
static void __exit brcmf_sdio_exit(void)
{
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");
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 @@
* 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 */
extern struct device *brcmf_bus_get_device(struct brcmf_bus *bus);
......
......@@ -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)
{
struct brcmf_info *drvr_priv = drvr->info;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册