As a consequence of removing explicit module initialization and
deferring probe until everything is ready, there's no need for custom
init and exit functions.
There are now module_init and module_exit calls but no real change in
functionality as these init and exit functions are no longer directly
called by core.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
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 c6c5d417b227..e6354843d856 100644
--- a/drivers/net/ethernet/ibm/emac/mal.c
+++ b/drivers/net/ethernet/ibm/emac/mal.c
@@ -752,12 +752,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 b544dd8633b7..6b61c49aa1f4 100644
--- a/drivers/net/ethernet/ibm/emac/rgmii.c
+++ b/drivers/net/ethernet/ibm/emac/rgmii.c
@@ -280,12 +280,4 @@ static struct platform_driver rgmii_driver = {
.probe = rgmii_probe,
};
-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 09f6373ed2f9..9e7d79e76a12 100644
--- a/drivers/net/ethernet/ibm/emac/tah.c
+++ b/drivers/net/ethernet/ibm/emac/tah.c
@@ -138,12 +138,4 @@ static struct platform_driver tah_driver = {
.probe = tah_probe,
};
-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 69ca6065de1c..40744733fd02 100644
--- a/drivers/net/ethernet/ibm/emac/zmii.c
+++ b/drivers/net/ethernet/ibm/emac/zmii.c
@@ -286,12 +286,4 @@ static struct platform_driver zmii_driver = {
.probe = zmii_probe,
};
-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