diff options
author | Franky Lin <frankyl@broadcom.com> | 2011-11-23 05:21:47 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-11-28 23:43:36 +0400 |
commit | 3392c888bbe6fb939dea952ea90bea4dc969c234 (patch) | |
tree | c89559dbc26b8f9e8b00b2679324fd076ea5c578 /drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | |
parent | 0c094c77ce9c338adc08d6d71b2d92a7761992b8 (diff) | |
download | linux-3392c888bbe6fb939dea952ea90bea4dc969c234.tar.xz |
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: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Alwin Beukers <alwin@broadcom.com>
Reviewed-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: Franky Lin <frankyl@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c')
-rw-r--r-- | drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c index adee3057d330..7a2325b2a564 100644 --- a/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c +++ b/drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c @@ -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); |