Thread (2 messages) 2 messages, 2 authors, 2012-10-10

Re: [PATCH 3.6.0- 2/3] net/mdio-octeon: use module_platform_driver macro

flat view

From: David Daney <hidden>
Date: 2012-10-10 18:46:16

On 10/10/2012 11:29 AM, Srinivas KANDAGATLA wrote:
From: Srinivas Kandagatla <redacted>

This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <redacted>
Acked-by: David Daney <redacted>

I have the same thing locally, but you beat me to sending it in.

quoted hunk ↗ jump to hunk
---
  drivers/net/phy/mdio-octeon.c |   14 +-------------
  1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index d4015aa..84f7c47 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -196,19 +196,7 @@ void octeon_mdiobus_force_mod_depencency(void)
  	/* Let ethernet drivers force us to be loaded.  */
  }
  EXPORT_SYMBOL(octeon_mdiobus_force_mod_depencency);
-
-static int __init octeon_mdiobus_mod_init(void)
-{
-	return platform_driver_register(&octeon_mdiobus_driver);
-}
-
-static void __exit octeon_mdiobus_mod_exit(void)
-{
-	platform_driver_unregister(&octeon_mdiobus_driver);
-}
-
-module_init(octeon_mdiobus_mod_init);
-module_exit(octeon_mdiobus_mod_exit);
+module_platform_driver(octeon_mdiobus_driver);

  MODULE_DESCRIPTION(DRV_DESCRIPTION);
  MODULE_VERSION(DRV_VERSION);
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help