]> git.sur5r.net Git - u-boot/blobdiff - drivers/spi/spi-uclass.c
mx7dsabresd: enable DFU support
[u-boot] / drivers / spi / spi-uclass.c
index 737ae64052acace832e332ba16ea69e3ddc8adc6..58388efbc3be29e8e96e3b64d78fee632bd05a0a 100644 (file)
@@ -95,13 +95,13 @@ int spi_xfer(struct spi_slave *slave, unsigned int bitlen,
        return spi_get_ops(bus)->xfer(dev, bitlen, dout, din, flags);
 }
 
-int spi_post_bind(struct udevice *dev)
+static int spi_post_bind(struct udevice *dev)
 {
        /* Scan the bus for devices */
        return dm_scan_fdt_node(dev, gd->fdt_blob, dev->of_offset, false);
 }
 
-int spi_child_post_bind(struct udevice *dev)
+static int spi_child_post_bind(struct udevice *dev)
 {
        struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev);
 
@@ -111,7 +111,7 @@ int spi_child_post_bind(struct udevice *dev)
        return spi_slave_ofdata_to_platdata(gd->fdt_blob, dev->of_offset, plat);
 }
 
-int spi_post_probe(struct udevice *bus)
+static int spi_post_probe(struct udevice *bus)
 {
        struct dm_spi_bus *spi = dev_get_uclass_priv(bus);
 
@@ -121,10 +121,10 @@ int spi_post_probe(struct udevice *bus)
        return 0;
 }
 
-int spi_child_pre_probe(struct udevice *dev)
+static int spi_child_pre_probe(struct udevice *dev)
 {
        struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev);
-       struct spi_slave *slave = dev_get_parentdata(dev);
+       struct spi_slave *slave = dev_get_parent_priv(dev);
 
        /*
         * This is needed because we pass struct spi_slave around the place
@@ -282,7 +282,7 @@ int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
                ret = device_probe(dev);
                if (ret)
                        goto err;
-               slave = dev_get_parentdata(dev);
+               slave = dev_get_parent_priv(dev);
                slave->dev = dev;
        }
 
@@ -291,7 +291,7 @@ int spi_get_bus_and_cs(int busnum, int cs, int speed, int mode,
                goto err;
 
        *busp = bus;
-       *devp = dev_get_parentdata(dev);
+       *devp = dev_get_parent_priv(dev);
        debug("%s: bus=%p, slave=%p\n", __func__, bus, *devp);
 
        return 0;
@@ -320,7 +320,7 @@ struct spi_slave *spi_setup_slave_fdt(const void *blob, int node,
        ret = device_get_child_by_of_offset(bus, node, &dev);
        if (ret)
                return NULL;
-       return dev_get_parentdata(dev);
+       return dev_get_parent_priv(dev);
 }
 
 /* Compatibility function - to be removed */