Skip to contentSkip to conversation

net: couple mdio_module_driver changes

PATCH In review Florian Fainelli 3 participants 6 messages Jan 23, 2017 – Jan 24, 2017

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover net: couple mdio_module_driver changes

Hi David,

Small patch series fixing a comment for mdio_module_driver and finally utilizing it in b53_mdio.

Thanks!

Florian Fainelli (2):
net: phy: Fix typo for MDIO module boilerplate comment
net: dsa: b53: Utilize mdio_module_driver

 drivers/net/dsa/b53/b53_mdio.c | 13 +------------
 include/linux/mdio.h           |  2 +-
 2 files changed, 2 insertions(+), 13 deletions(-)
Signature · 1 line
2.9.3
#1 lore raw

PATCH 1/2 net: phy: Fix typo for MDIO module boilerplate comment

The module boilerplate macro is named mdio_module_driver and not module_mdio_driver, fix that.

Fixes a9049e0c513c ("mdio: Add support for mdio drivers.")
---
 include/linux/mdio.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
include/linux/mdio.h +1 -1
index b6587a4b32e7..55a80d73cfc1 100644
@@ -265,7 +265,7 @@ bool mdiobus_is_registered_device(struct mii_bus *bus, int addr);
 struct phy_device *mdiobus_get_phy(struct mii_bus *bus, int addr);
 
 /**
- * module_mdio_driver() - Helper macro for registering mdio drivers
+ * mdio_module_driver() - Helper macro for registering mdio drivers
  *
  * Helper macro for MDIO drivers which do not do anything special in module
  * init/exit. Each module may only use this macro once, and calling it
Signature · 1 line
2.9.3
maintainer Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH net-next 1/2] net: phy: Fix typo for MDIO module boilerplate comment

Quoted 5 lines · Florian Fainelli

The module boilerplate macro is named mdio_module_driver and not module_mdio_driver, fix that.

Fixes a9049e0c513c ("mdio: Add support for mdio drivers.")

Andrew

#3 lore raw

PATCH 2/2 net: dsa: b53: Utilize mdio_module_driver

In reply to Florian Fainelli

Eliminate a bit of boilerplate code.

---
 drivers/net/dsa/b53/b53_mdio.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)
drivers/net/dsa/b53/b53_mdio.c +1 -12
index 477a16b5660a..fa7556f5d4fb 100644
@@ -375,18 +375,7 @@ static struct mdio_driver b53_mdio_driver = {
 		.of_match_table = b53_of_match,
 	},
 };
-
-static int __init b53_mdio_driver_register(void)
-{
-	return mdio_driver_register(&b53_mdio_driver);
-}
-module_init(b53_mdio_driver_register);
-
-static void __exit b53_mdio_driver_unregister(void)
-{
-	mdio_driver_unregister(&b53_mdio_driver);
-}
-module_exit(b53_mdio_driver_unregister);
+mdio_module_driver(b53_mdio_driver);
 
 MODULE_DESCRIPTION("B53 MDIO access driver");
 MODULE_LICENSE("Dual BSD/GPL");
Signature · 1 line
2.9.3