summaryrefslogtreecommitdiff
path: root/drivers/spi/spi-uclass.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-04-19 09:05:40 -0600
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>2015-04-23 15:23:45 +0530
commit9694b724421b88acf7d553a55e4a43fa4e25e7be (patch)
tree4a4fada5869fe5606950485b22fd6031ef6647c4 /drivers/spi/spi-uclass.c
parent4fbad92e7382c74757a58491deb6d210d1d842db (diff)
dm: spi: Correct SPI claim/release_bus() methods
These methods should be passed a slave device, not a bus. This matches the old SPI interface. It is important to know which device is claiming the bus so passing a bus is not that useful. Reported-by: Haikun Wang <haikun.wang@freescale.com> Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Peng Fan <Peng.Fan@freescale.com> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'drivers/spi/spi-uclass.c')
-rw-r--r--drivers/spi/spi-uclass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index 866c48f243..83fe8e0d69 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -67,7 +67,7 @@ int spi_claim_bus(struct spi_slave *slave)
if (ret)
return ret;
- return ops->claim_bus ? ops->claim_bus(bus) : 0;
+ return ops->claim_bus ? ops->claim_bus(dev) : 0;
}
void spi_release_bus(struct spi_slave *slave)
@@ -77,7 +77,7 @@ void spi_release_bus(struct spi_slave *slave)
struct dm_spi_ops *ops = spi_get_ops(bus);
if (ops->release_bus)
- ops->release_bus(bus);
+ ops->release_bus(dev);
}
int spi_xfer(struct spi_slave *slave, unsigned int bitlen,