[PATCHv2 net-next 08/10] net: lantiq_etop: use module_platform_driver_probe

From: Rosen Penev
Date: Tue Oct 01 2024 - 14:48:43 EST


The explicit init and exit functions don't do anything special. Just use
the macro.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
Reviewed-by: Shannon Nelson <shannon.nelson@xxxxxxx>
---
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 3e9937c7371a..1458796c4e30 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@xxxxxxxxxxx>");
MODULE_DESCRIPTION("Lantiq SoC ETOP");
--
2.46.2