From 9694b724421b88acf7d553a55e4a43fa4e25e7be Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Apr 2015 09:05:40 -0600 Subject: 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 Signed-off-by: Simon Glass Tested-by: Peng Fan Reviewed-by: Jagannadha Sutradharudu Teki --- include/spi.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'include/spi.h') 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 -- cgit v1.1