net/wireless: use module_pci_driver
This patch converts the drivers in drivers/net/wireless/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin <axel.lin@gmail.com> Cc: "John W. Linville" <linville@tuxdriver.com> Cc: Jiri Slaby <jirislaby@gmail.com> Cc: Nick Kossifidis <mickflemm@gmail.com> Cc: "Luis R. Rodriguez" <mcgrof@qca.qualcomm.com> Cc: Simon Kelley <simon@thekelleys.org.uk> Cc: Jouni Malinen <j@w1.fi> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Christian Lamparter <chunkeey@googlemail.com> Cc: Ivo van Doorn <IvDoorn@gmail.com> Cc: Larry Finger <Larry.Finger@lwfinger.net> Cc: linux-wireless@vger.kernel.org Acked-by: Lennert Buytenhek <buytenh@wantstofly.org> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:
parent
1dae27f84b
commit
5b0a3b7eb3
|
@ -1991,19 +1991,4 @@ static struct pci_driver adm8211_driver = {
|
|||
#endif /* CONFIG_PM */
|
||||
};
|
||||
|
||||
|
||||
|
||||
static int __init adm8211_init(void)
|
||||
{
|
||||
return pci_register_driver(&adm8211_driver);
|
||||
}
|
||||
|
||||
|
||||
static void __exit adm8211_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&adm8211_driver);
|
||||
}
|
||||
|
||||
|
||||
module_init(adm8211_init);
|
||||
module_exit(adm8211_exit);
|
||||
module_pci_driver(adm8211_driver);
|
||||
|
|
|
@ -340,28 +340,4 @@ static struct pci_driver ath5k_pci_driver = {
|
|||
.driver.pm = ATH5K_PM_OPS,
|
||||
};
|
||||
|
||||
/*
|
||||
* Module init/exit functions
|
||||
*/
|
||||
static int __init
|
||||
init_ath5k_pci(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = pci_register_driver(&ath5k_pci_driver);
|
||||
if (ret) {
|
||||
pr_err("pci: can't register pci driver\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void __exit
|
||||
exit_ath5k_pci(void)
|
||||
{
|
||||
pci_unregister_driver(&ath5k_pci_driver);
|
||||
}
|
||||
|
||||
module_init(init_ath5k_pci);
|
||||
module_exit(exit_ath5k_pci);
|
||||
module_pci_driver(ath5k_pci_driver);
|
||||
|
|
|
@ -74,15 +74,4 @@ static void __devexit atmel_pci_remove(struct pci_dev *pdev)
|
|||
stop_atmel_card(pci_get_drvdata(pdev));
|
||||
}
|
||||
|
||||
static int __init atmel_init_module(void)
|
||||
{
|
||||
return pci_register_driver(&atmel_driver);
|
||||
}
|
||||
|
||||
static void __exit atmel_cleanup_module(void)
|
||||
{
|
||||
pci_unregister_driver(&atmel_driver);
|
||||
}
|
||||
|
||||
module_init(atmel_init_module);
|
||||
module_exit(atmel_cleanup_module);
|
||||
module_pci_driver(atmel_driver);
|
||||
|
|
|
@ -457,18 +457,4 @@ static struct pci_driver prism2_pci_driver = {
|
|||
#endif /* CONFIG_PM */
|
||||
};
|
||||
|
||||
|
||||
static int __init init_prism2_pci(void)
|
||||
{
|
||||
return pci_register_driver(&prism2_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
static void __exit exit_prism2_pci(void)
|
||||
{
|
||||
pci_unregister_driver(&prism2_pci_driver);
|
||||
}
|
||||
|
||||
|
||||
module_init(init_prism2_pci);
|
||||
module_exit(exit_prism2_pci);
|
||||
module_pci_driver(prism2_pci_driver);
|
||||
|
|
|
@ -616,18 +616,4 @@ static struct pci_driver prism2_plx_driver = {
|
|||
.remove = prism2_plx_remove,
|
||||
};
|
||||
|
||||
|
||||
static int __init init_prism2_plx(void)
|
||||
{
|
||||
return pci_register_driver(&prism2_plx_driver);
|
||||
}
|
||||
|
||||
|
||||
static void __exit exit_prism2_plx(void)
|
||||
{
|
||||
pci_unregister_driver(&prism2_plx_driver);
|
||||
}
|
||||
|
||||
|
||||
module_init(init_prism2_plx);
|
||||
module_exit(exit_prism2_plx);
|
||||
module_pci_driver(prism2_plx_driver);
|
||||
|
|
|
@ -5893,18 +5893,7 @@ static struct pci_driver mwl8k_driver = {
|
|||
.shutdown = __devexit_p(mwl8k_shutdown),
|
||||
};
|
||||
|
||||
static int __init mwl8k_init(void)
|
||||
{
|
||||
return pci_register_driver(&mwl8k_driver);
|
||||
}
|
||||
|
||||
static void __exit mwl8k_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&mwl8k_driver);
|
||||
}
|
||||
|
||||
module_init(mwl8k_init);
|
||||
module_exit(mwl8k_exit);
|
||||
module_pci_driver(mwl8k_driver);
|
||||
|
||||
MODULE_DESCRIPTION(MWL8K_DESC);
|
||||
MODULE_VERSION(MWL8K_VERSION);
|
||||
|
|
|
@ -667,15 +667,4 @@ static struct pci_driver p54p_driver = {
|
|||
.driver.pm = P54P_PM_OPS,
|
||||
};
|
||||
|
||||
static int __init p54p_init(void)
|
||||
{
|
||||
return pci_register_driver(&p54p_driver);
|
||||
}
|
||||
|
||||
static void __exit p54p_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&p54p_driver);
|
||||
}
|
||||
|
||||
module_init(p54p_init);
|
||||
module_exit(p54p_exit);
|
||||
module_pci_driver(p54p_driver);
|
||||
|
|
|
@ -1828,15 +1828,4 @@ static struct pci_driver rt2400pci_driver = {
|
|||
.resume = rt2x00pci_resume,
|
||||
};
|
||||
|
||||
static int __init rt2400pci_init(void)
|
||||
{
|
||||
return pci_register_driver(&rt2400pci_driver);
|
||||
}
|
||||
|
||||
static void __exit rt2400pci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rt2400pci_driver);
|
||||
}
|
||||
|
||||
module_init(rt2400pci_init);
|
||||
module_exit(rt2400pci_exit);
|
||||
module_pci_driver(rt2400pci_driver);
|
||||
|
|
|
@ -2119,15 +2119,4 @@ static struct pci_driver rt2500pci_driver = {
|
|||
.resume = rt2x00pci_resume,
|
||||
};
|
||||
|
||||
static int __init rt2500pci_init(void)
|
||||
{
|
||||
return pci_register_driver(&rt2500pci_driver);
|
||||
}
|
||||
|
||||
static void __exit rt2500pci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rt2500pci_driver);
|
||||
}
|
||||
|
||||
module_init(rt2500pci_init);
|
||||
module_exit(rt2500pci_exit);
|
||||
module_pci_driver(rt2500pci_driver);
|
||||
|
|
|
@ -3092,15 +3092,4 @@ static struct pci_driver rt61pci_driver = {
|
|||
.resume = rt2x00pci_resume,
|
||||
};
|
||||
|
||||
static int __init rt61pci_init(void)
|
||||
{
|
||||
return pci_register_driver(&rt61pci_driver);
|
||||
}
|
||||
|
||||
static void __exit rt61pci_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rt61pci_driver);
|
||||
}
|
||||
|
||||
module_init(rt61pci_init);
|
||||
module_exit(rt61pci_exit);
|
||||
module_pci_driver(rt61pci_driver);
|
||||
|
|
|
@ -1173,15 +1173,4 @@ static struct pci_driver rtl8180_driver = {
|
|||
#endif /* CONFIG_PM */
|
||||
};
|
||||
|
||||
static int __init rtl8180_init(void)
|
||||
{
|
||||
return pci_register_driver(&rtl8180_driver);
|
||||
}
|
||||
|
||||
static void __exit rtl8180_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rtl8180_driver);
|
||||
}
|
||||
|
||||
module_init(rtl8180_init);
|
||||
module_exit(rtl8180_exit);
|
||||
module_pci_driver(rtl8180_driver);
|
||||
|
|
|
@ -389,21 +389,4 @@ static struct pci_driver rtl92ce_driver = {
|
|||
.driver.pm = &rtlwifi_pm_ops,
|
||||
};
|
||||
|
||||
static int __init rtl92ce_module_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = pci_register_driver(&rtl92ce_driver);
|
||||
if (ret)
|
||||
RT_ASSERT(false, "No device found\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit rtl92ce_module_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rtl92ce_driver);
|
||||
}
|
||||
|
||||
module_init(rtl92ce_module_init);
|
||||
module_exit(rtl92ce_module_exit);
|
||||
module_pci_driver(rtl92ce_driver);
|
||||
|
|
|
@ -450,21 +450,4 @@ static struct pci_driver rtl92se_driver = {
|
|||
.driver.pm = &rtlwifi_pm_ops,
|
||||
};
|
||||
|
||||
static int __init rtl92se_module_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
ret = pci_register_driver(&rtl92se_driver);
|
||||
if (ret)
|
||||
RT_ASSERT(false, "No device found\n");
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void __exit rtl92se_module_exit(void)
|
||||
{
|
||||
pci_unregister_driver(&rtl92se_driver);
|
||||
}
|
||||
|
||||
module_init(rtl92se_module_init);
|
||||
module_exit(rtl92se_module_exit);
|
||||
module_pci_driver(rtl92se_driver);
|
||||
|
|
Loading…
Reference in New Issue