[PATCHv2 net-next 03/18] net: ibm: emac: use module_platform_driver for modules

From: Rosen Penev
Date: Tue Oct 01 2024 - 16:59:34 EST


These init and exit functions don't do anything special. Just macro it
away.

Signed-off-by: Rosen Penev <rosenp@xxxxxxxxx>
---
drivers/net/ethernet/ibm/emac/mal.c | 10 +---------
drivers/net/ethernet/ibm/emac/rgmii.c | 10 +---------
drivers/net/ethernet/ibm/emac/tah.c | 10 +---------
drivers/net/ethernet/ibm/emac/zmii.c | 10 +---------
4 files changed, 4 insertions(+), 36 deletions(-)

diff --git a/drivers/net/ethernet/ibm/emac/mal.c b/drivers/net/ethernet/ibm/emac/mal.c
index d92dd9c83031..a632d3a207d3 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -779,12 +779,4 @@ static struct platform_driver mal_of_driver = {
.remove_new = mal_remove,
};

-int __init mal_init(void)
-{
- return platform_driver_register(&mal_of_driver);
-}
-
-void mal_exit(void)
-{
- platform_driver_unregister(&mal_of_driver);
-}
+module_platform_driver(mal_of_driver);
diff --git a/drivers/net/ethernet/ibm/emac/rgmii.c b/drivers/net/ethernet/ibm/emac/rgmii.c
index e1712fdc3c31..52f080661f87 100644
--- a/drivers/net/ethernet/ibm/emac/rgmii.c
+++ b/drivers/net/ethernet/ibm/emac/rgmii.c
@@ -303,12 +303,4 @@ static struct platform_driver rgmii_driver = {
.remove_new = rgmii_remove,
};

-int __init rgmii_init(void)
-{
- return platform_driver_register(&rgmii_driver);
-}
-
-void rgmii_exit(void)
-{
- platform_driver_unregister(&rgmii_driver);
-}
+module_platform_driver(rgmii_driver);
diff --git a/drivers/net/ethernet/ibm/emac/tah.c b/drivers/net/ethernet/ibm/emac/tah.c
index fa3488258ca2..8407ff83b1d3 100644
--- a/drivers/net/ethernet/ibm/emac/tah.c
+++ b/drivers/net/ethernet/ibm/emac/tah.c
@@ -161,12 +161,4 @@ static struct platform_driver tah_driver = {
.remove_new = tah_remove,
};

-int __init tah_init(void)
-{
- return platform_driver_register(&tah_driver);
-}
-
-void tah_exit(void)
-{
- platform_driver_unregister(&tah_driver);
-}
+module_platform_driver(tah_driver);
diff --git a/drivers/net/ethernet/ibm/emac/zmii.c b/drivers/net/ethernet/ibm/emac/zmii.c
index 26e86cdee2f6..97cea64abe55 100644
--- a/drivers/net/ethernet/ibm/emac/zmii.c
+++ b/drivers/net/ethernet/ibm/emac/zmii.c
@@ -309,12 +309,4 @@ static struct platform_driver zmii_driver = {
.remove_new = zmii_remove,
};

-int __init zmii_init(void)
-{
- return platform_driver_register(&zmii_driver);
-}
-
-void zmii_exit(void)
-{
- platform_driver_unregister(&zmii_driver);
-}
+module_platform_driver(zmii_driver);
--
2.46.2