[PATCH net-next 8/9] net: lantiq_etop: use module_platform_driver_probe

Rosen Penev posted 9 patches 1 month, 4 weeks ago
There is a newer version of this series
[PATCH net-next 8/9] net: lantiq_etop: use module_platform_driver_probe
Posted by Rosen Penev 1 month, 4 weeks ago
The explicit init and exit functions don't do anything special. Just use
the macro.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 drivers/net/ethernet/lantiq_etop.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

diff --git a/drivers/net/ethernet/lantiq_etop.c b/drivers/net/ethernet/lantiq_etop.c
index 0cb5d536f351..4d8534092667 100644
--- a/drivers/net/ethernet/lantiq_etop.c
+++ b/drivers/net/ethernet/lantiq_etop.c
@@ -686,24 +686,7 @@ static struct platform_driver ltq_mii_driver = {
 	},
 };
 
-static int __init
-init_ltq_etop(void)
-{
-	int ret = platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
-
-	if (ret)
-		pr_err("ltq_etop: Error registering platform driver!");
-	return ret;
-}
-
-static void __exit
-exit_ltq_etop(void)
-{
-	platform_driver_unregister(&ltq_mii_driver);
-}
-
-module_init(init_ltq_etop);
-module_exit(exit_ltq_etop);
+module_platform_driver_probe(&ltq_mii_driver, ltq_etop_probe);
 
 MODULE_AUTHOR("John Crispin <blogic@openwrt.org>");
 MODULE_DESCRIPTION("Lantiq SoC ETOP");
-- 
2.46.2