]> git.karo-electronics.de Git - linux-beck.git/commitdiff
brcm80211: fmac: move module entry points to dhd_linux.c
authorArend van Spriel <arend@broadcom.com>
Thu, 9 Feb 2012 20:09:03 +0000 (21:09 +0100)
committerJohn W. Linville <linville@tuxdriver.com>
Wed, 22 Feb 2012 19:48:51 +0000 (14:48 -0500)
The module_init/exit functions are moved to dhd_linux.c to prepare
for supporting multiple host interface types.

Reviewed-by: Pieter-Paul Giesberts <pieterpg@broadcom.com>
Reviewed-by: Franky (Zhenhui) Lin <frankyl@broadcom.com>
Signed-off-by: Arend van Spriel <arend@broadcom.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
drivers/net/wireless/brcm80211/brcmfmac/bcmsdh_sdmmc.c
drivers/net/wireless/brcm80211/brcmfmac/dhd_bus.h
drivers/net/wireless/brcm80211/brcmfmac/dhd_linux.c

index 1d2b74d3fa214ec242615f6502a6ac74104f111a..83ca3cc2cccb72f2017da288261e34c23600d76e 100644 (file)
@@ -597,14 +597,14 @@ static struct sdio_driver brcmf_sdmmc_driver = {
 #endif /* CONFIG_PM_SLEEP */
 };
 
-static void __exit brcmf_sdio_exit(void)
+void brcmf_sdio_exit(void)
 {
        brcmf_dbg(TRACE, "Enter\n");
 
        sdio_unregister_driver(&brcmf_sdmmc_driver);
 }
 
-static int __init brcmf_sdio_init(void)
+int brcmf_sdio_init(void)
 {
        int ret;
 
@@ -617,6 +617,3 @@ static int __init brcmf_sdio_init(void)
 
        return ret;
 }
-
-module_init(brcmf_sdio_init);
-module_exit(brcmf_sdio_exit);
index 567a966f76346d954c8f1a576a495e32375ed843..bc575b4f158ece4b9b26d0b3a806917a7ce93927 100644 (file)
@@ -105,4 +105,10 @@ extern int brcmf_bus_start(struct device *dev);
 
 extern int brcmf_add_if(struct device *dev, int ifidx,
                        char *name, u8 *mac_addr);
+
+#ifdef CONFIG_BRCMFMAC_SDIO
+extern void brcmf_sdio_exit(void);
+extern int brcmf_sdio_init(void);
+#endif
+
 #endif                         /* _BRCMF_BUS_H_ */
index eff0073879c711cbc68d9c2bbb0cdeb038072c56..ff7fc0e9f807ccf4ac480b87263acaaafec68321 100644 (file)
@@ -1183,3 +1183,27 @@ exit:
        return ret;
 }
 #endif                         /* DEBUG */
+
+static int __init brcmfmac_init(void)
+{
+       int ret = 0;
+
+#ifdef CONFIG_BRCMFMAC_SDIO
+       ret = brcmf_sdio_init();
+       if (ret)
+               goto fail;
+#endif
+
+fail:
+       return ret;
+}
+
+static void __exit brcmfmac_exit(void)
+{
+#ifdef CONFIG_BRCMFMAC_SDIO
+       brcmf_sdio_exit();
+#endif
+}
+
+module_init(brcmfmac_init);
+module_exit(brcmfmac_exit);