[PATCH 05/12] mdio: add bus device

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Sun Oct 14 17:01:11 EDT 2012


Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 drivers/net/phy/mdio_bus.c |    6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index b49f714..eba3e1f 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -233,6 +233,11 @@ static void mdio_bus_remove(struct device_d *_dev)
 	devfs_remove(&dev->cdev);
 }
 
+struct device_d mdio_bus = {
+	.name = "mdio_bus",
+	.id = DEVICE_ID_SINGLE,
+};
+
 struct bus_type mdio_bus_type = {
 	.name		= "mdio_bus",
 	.match		= mdio_bus_match,
@@ -243,6 +248,7 @@ EXPORT_SYMBOL(mdio_bus_type);
 
 static int mdio_bus_init(void)
 {
+	register_device(&mdio_bus);
 	return bus_register(&mdio_bus_type);
 }
 pure_initcall(mdio_bus_init);
-- 
1.7.10.4




More information about the barebox mailing list