]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/net/dsa/mv88e6131.c
dsa: Replace mii_bus with a generic host device
[karo-tx-linux.git] / drivers / net / dsa / mv88e6131.c
index 35541f2ceca3f3b87631fbd333fe9ec29a4c75fc..244c735014fa47421b25091efd9b70077e1089e0 100644 (file)
 #define ID_6095                0x0950
 #define ID_6131                0x1060
 
-static char *mv88e6131_probe(struct mii_bus *bus, int sw_addr)
+static char *mv88e6131_probe(struct device *host_dev, int sw_addr)
 {
+       struct mii_bus *bus = dsa_host_dev_to_mii_bus(host_dev);
        int ret;
 
+       if (bus == NULL)
+               return NULL;
+
        ret = __mv88e6xxx_reg_read(bus, sw_addr, REG_PORT(0), 0x03);
        if (ret >= 0) {
                ret &= 0xfff0;