diff options
author | Tom Rini <trini@konsulko.com> | 2017-02-08 16:24:44 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2017-02-08 16:24:44 -0500 |
commit | 21342d4aed6c77a4aa7a5b2579b3c23e21aea31a (patch) | |
tree | 279c781bdcbe697257ff86714fa0355bcd92fd19 /drivers/spi/spi-uclass.c | |
parent | 7582ddce132390fba10822c5977cd1ab532bb1eb (diff) | |
parent | f11a0af713a714ee2efcd810dd81c6dfd59381aa (diff) |
Merge git://git.denx.de/u-boot-dm
Diffstat (limited to 'drivers/spi/spi-uclass.c')
-rw-r--r-- | drivers/spi/spi-uclass.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c index 1ab5b75fa1..ac17da0777 100644 --- a/drivers/spi/spi-uclass.c +++ b/drivers/spi/spi-uclass.c @@ -113,10 +113,11 @@ static int spi_child_post_bind(struct udevice *dev) { struct dm_spi_slave_platdata *plat = dev_get_parent_platdata(dev); - if (dev->of_offset == -1) + if (dev_of_offset(dev) == -1) return 0; - return spi_slave_ofdata_to_platdata(gd->fdt_blob, dev->of_offset, plat); + return spi_slave_ofdata_to_platdata(gd->fdt_blob, dev_of_offset(dev), + plat); } #endif @@ -125,7 +126,7 @@ static int spi_post_probe(struct udevice *bus) #if !CONFIG_IS_ENABLED(OF_PLATDATA) struct dm_spi_bus *spi = dev_get_uclass_priv(bus); - spi->max_hz = fdtdec_get_int(gd->fdt_blob, bus->of_offset, + spi->max_hz = fdtdec_get_int(gd->fdt_blob, dev_of_offset(bus), "spi-max-frequency", 0); #endif #if defined(CONFIG_NEEDS_MANUAL_RELOC) |