brcm80211: fmac: initialize host interface drivers regardless result
The module init function of brcmfmac calls init functions for SDIO and USB doing driver registration. This patch removes terminating the module init when a driver registration for one host interface fails. 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>
This commit is contained in:
committed by
John W. Linville
parent
1d9c1796bc
commit
549040abbc
@@ -604,7 +604,7 @@ void brcmf_sdio_exit(void)
|
|||||||
sdio_unregister_driver(&brcmf_sdmmc_driver);
|
sdio_unregister_driver(&brcmf_sdmmc_driver);
|
||||||
}
|
}
|
||||||
|
|
||||||
int brcmf_sdio_init(void)
|
void brcmf_sdio_init(void)
|
||||||
{
|
{
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
@@ -614,6 +614,4 @@ int brcmf_sdio_init(void)
|
|||||||
|
|
||||||
if (ret)
|
if (ret)
|
||||||
brcmf_dbg(ERROR, "sdio_register_driver failed: %d\n", ret);
|
brcmf_dbg(ERROR, "sdio_register_driver failed: %d\n", ret);
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
@@ -108,11 +108,11 @@ extern int brcmf_add_if(struct device *dev, int ifidx,
|
|||||||
|
|
||||||
#ifdef CONFIG_BRCMFMAC_SDIO
|
#ifdef CONFIG_BRCMFMAC_SDIO
|
||||||
extern void brcmf_sdio_exit(void);
|
extern void brcmf_sdio_exit(void);
|
||||||
extern int brcmf_sdio_init(void);
|
extern void brcmf_sdio_init(void);
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BRCMFMAC_USB
|
#ifdef CONFIG_BRCMFMAC_USB
|
||||||
extern void brcmf_usb_exit(void);
|
extern void brcmf_usb_exit(void);
|
||||||
extern int brcmf_usb_init(void);
|
extern void brcmf_usb_init(void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif /* _BRCMF_BUS_H_ */
|
#endif /* _BRCMF_BUS_H_ */
|
||||||
|
@@ -1183,21 +1183,13 @@ exit:
|
|||||||
|
|
||||||
static int __init brcmfmac_init(void)
|
static int __init brcmfmac_init(void)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
|
||||||
|
|
||||||
#ifdef CONFIG_BRCMFMAC_SDIO
|
#ifdef CONFIG_BRCMFMAC_SDIO
|
||||||
ret = brcmf_sdio_init();
|
brcmf_sdio_init();
|
||||||
if (ret)
|
|
||||||
goto fail;
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef CONFIG_BRCMFMAC_USB
|
#ifdef CONFIG_BRCMFMAC_USB
|
||||||
ret = brcmf_usb_init();
|
brcmf_usb_init();
|
||||||
if (ret)
|
|
||||||
goto fail;
|
|
||||||
#endif
|
#endif
|
||||||
|
return 0;
|
||||||
fail:
|
|
||||||
return ret;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void __exit brcmfmac_exit(void)
|
static void __exit brcmfmac_exit(void)
|
||||||
|
@@ -1615,7 +1615,7 @@ void brcmf_usb_exit(void)
|
|||||||
g_image.len = 0;
|
g_image.len = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int brcmf_usb_init(void)
|
void brcmf_usb_init(void)
|
||||||
{
|
{
|
||||||
return usb_register(&brcmf_usbdrvr);
|
usb_register(&brcmf_usbdrvr);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user