]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - drivers/misc/cros_ec_spi.c
dm: spi: Move slave details to child platdata
[karo-tx-uboot.git] / drivers / misc / cros_ec_spi.c
index e6dba298b1e9f2a37b31b4511cf9c8902c9ff227..25a5a0468e6bb52944fbb0e71fb16a8e3d96c280 100644 (file)
@@ -202,25 +202,6 @@ int cros_ec_spi_init(struct cros_ec_dev *dev, const void *blob)
 #ifdef CONFIG_DM_CROS_EC
 int cros_ec_probe(struct udevice *dev)
 {
-       struct spi_slave *slave = dev_get_parentdata(dev);
-       int ret;
-
-       /*
-        * TODO(sjg@chromium.org)
-        *
-        * This is really horrible at present. It is an artifact of removing
-        * the child_pre_probe() method for SPI. Everything here could go in
-        * an automatic function, except that spi_get_bus_and_cs() wants to
-        * set it up manually and call device_probe_child().
-        *
-        * The solution may be to re-enable the child_pre_probe() method for
-        * SPI and have it do nothing if the child is already passed in via
-        * device_probe_child().
-        */
-       slave->dev = dev;
-       ret = spi_ofdata_to_platdata(gd->fdt_blob, dev->of_offset, slave);
-       if (ret)
-               return ret;
        return cros_ec_register(dev);
 }