Remove obsolete #include <linux/config.h>
[sfrench/cifs-2.6.git] / drivers / net / phy / mdio_bus.c
index 5eab9c42a111228e827fae0a2d37fbae4f0c1a2e..1dde390c164d9952e0324582a1f5e6c80bd64b6d 100644 (file)
@@ -13,7 +13,6 @@
  * option) any later version.
  *
  */
-#include <linux/config.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
 #include <linux/string.h>
@@ -29,7 +28,6 @@
 #include <linux/spinlock.h>
 #include <linux/mm.h>
 #include <linux/module.h>
-#include <linux/version.h>
 #include <linux/mii.h>
 #include <linux/ethtool.h>
 #include <linux/phy.h>
@@ -61,8 +59,10 @@ int mdiobus_register(struct mii_bus *bus)
        for (i = 0; i < PHY_MAX_ADDR; i++) {
                struct phy_device *phydev;
 
-               if (bus->phy_mask & (1 << i))
+               if (bus->phy_mask & (1 << i)) {
+                       bus->phy_map[i] = NULL;
                        continue;
+               }
 
                phydev = get_phy_device(bus, i);
 
@@ -82,7 +82,7 @@ int mdiobus_register(struct mii_bus *bus)
 
                        phydev->dev.parent = bus->dev;
                        phydev->dev.bus = &mdio_bus_type;
-                       sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i);
+                       snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i);
 
                        phydev->bus = bus;