diff options
author | Simon Glass <sjg@chromium.org> | 2015-04-19 09:05:40 -0600 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2015-08-18 16:45:20 -0700 |
commit | 08c70ad7fea209f8f1b954d3f53314859d8aa5b8 (patch) | |
tree | 31360b62dc30bba6d7ca35642c312a864d19041e /include | |
parent | f7c3186985ebb244d075b04ed7c055f39f485670 (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 'include')
-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 c58e453559..863e6db497 100644 --- a/include/spi.h +++ b/include/spi.h @@ -385,12 +385,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 @@ -399,9 +399,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 @@ -413,7 +413,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 |