diff options
author | Simon Glass <sjg@chromium.org> | 2015-04-19 09:05:40 -0600 |
---|---|---|
committer | Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com> | 2015-04-23 15:23:45 +0530 |
commit | 9694b724421b88acf7d553a55e4a43fa4e25e7be (patch) | |
tree | 4a4fada5869fe5606950485b22fd6031ef6647c4 /include/spi.h | |
parent | 4fbad92e7382c74757a58491deb6d210d1d842db (diff) | |
download | u-boot-imx-9694b724421b88acf7d553a55e4a43fa4e25e7be.zip u-boot-imx-9694b724421b88acf7d553a55e4a43fa4e25e7be.tar.gz u-boot-imx-9694b724421b88acf7d553a55e4a43fa4e25e7be.tar.bz2 |
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 'include/spi.h')
-rw-r--r-- | include/spi.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/spi.h b/include/spi.h index 7829063..9495ca5 100644 --- a/include/spi.h +++ b/include/spi.h @@ -386,12 +386,12 @@ struct dm_spi_ops { * allowed to claim the same bus for several slaves without releasing * the bus in between. * - * @bus: The SPI slave + * @dev: The SPI slave * * Returns: 0 if the bus was claimed successfully, or a negative value * if it wasn't. */ - int (*claim_bus)(struct udevice *bus); + int (*claim_bus)(struct udevice *dev); /** * Release the SPI bus @@ -400,9 +400,9 @@ struct dm_spi_ops { * all transfers have finished. It may disable any SPI hardware as * appropriate. * - * @bus: The SPI slave + * @dev: The SPI slave */ - int (*release_bus)(struct udevice *bus); + int (*release_bus)(struct udevice *dev); /** * Set the word length for SPI transactions @@ -414,7 +414,7 @@ struct dm_spi_ops { * * Returns: 0 on success, -ve on failure. */ - int (*set_wordlen)(struct udevice *bus, unsigned int wordlen); + int (*set_wordlen)(struct udevice *dev, unsigned int wordlen); /** * SPI transfer |