diff options
author | Heiko Schocher <hs@denx.de> | 2019-05-26 12:15:46 +0200 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2019-06-11 10:42:48 +0200 |
commit | 2b849e1f742c645518be81841cf9c325c839ccc3 (patch) | |
tree | c45f1c93297e8ded7e82579fcf018867a87b9718 /drivers/spi | |
parent | 16c776d321aa847514f2134f890717f4de6a998c (diff) |
spi: imx: remove doubled pointer from mxc_spi_probe
in mxc_spi_probe() plat and mxcs pointer are created:
struct mxc_spi_slave *plat = bus->platdata;
struct mxc_spi_slave *mxcs = dev_get_platdata(bus);
which have the same value. Remove plat pointer.
Signed-off-by: Heiko Schocher <hs@denx.de>
Diffstat (limited to 'drivers/spi')
-rw-r--r-- | drivers/spi/mxc_spi.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/spi/mxc_spi.c b/drivers/spi/mxc_spi.c index 6846762719..fba76bf740 100644 --- a/drivers/spi/mxc_spi.c +++ b/drivers/spi/mxc_spi.c @@ -488,7 +488,6 @@ void spi_release_bus(struct spi_slave *slave) static int mxc_spi_probe(struct udevice *bus) { - struct mxc_spi_slave *plat = bus->platdata; struct mxc_spi_slave *mxcs = dev_get_platdata(bus); int node = dev_of_offset(bus); const void *blob = gd->fdt_blob; @@ -500,11 +499,11 @@ static int mxc_spi_probe(struct udevice *bus) return -EINVAL; } - plat->base = devfdt_get_addr(bus); - if (plat->base == FDT_ADDR_T_NONE) + mxcs->base = devfdt_get_addr(bus); + if (mxcs->base == FDT_ADDR_T_NONE) return -ENODEV; - ret = dm_gpio_set_value(&plat->ss, 0); + ret = dm_gpio_set_value(&mxcs->ss, 0); if (ret) { dev_err(bus, "Setting cs error\n"); return ret; |