net/ethoc: use priv instead of dev internally
[oweals/u-boot.git] / drivers / mmc / pic32_sdhci.c
index 28da55d2db5e1aa8546ee6e0e7d710f06eb6b61b..abe74293edfdb609dde6fa0d308ff81e17b798bf 100644 (file)
@@ -29,7 +29,7 @@ static int pic32_sdhci_probe(struct udevice *dev)
                return -EINVAL;
 
        host->ioaddr    = ioremap(addr, size);
-       host->name      = (char *)dev->name;
+       host->name      = dev->name;
        host->quirks    = SDHCI_QUIRK_NO_HISPD_BIT | SDHCI_QUIRK_NO_CD;
        host->bus_width = fdtdec_get_int(gd->fdt_blob, dev->of_offset,
                                        "bus-width", 4);
@@ -41,7 +41,12 @@ static int pic32_sdhci_probe(struct udevice *dev)
                return ret;
        }
 
-       return add_sdhci(host, f_min_max[1], f_min_max[0]);
+       ret = add_sdhci(host, f_min_max[1], f_min_max[0]);
+       if (ret)
+               return ret;
+       host->mmc->dev = dev;
+
+       return 0;
 }
 
 static const struct udevice_id pic32_sdhci_ids[] = {