summaryrefslogtreecommitdiff
path: root/drivers/spi
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@ingics.com>2015-01-15 13:32:55 +0800
committerJagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>2015-03-30 01:39:20 +0530
commita46988f11f7fad3043c6db1169f05d10f002d12c (patch)
tree05b80c7c86323d434e5209b99d6f0684e56fb4a2 /drivers/spi
parent662e2acb46250881ec26bc8366fc9eb1856cb7c2 (diff)
downloadu-boot-imx-a46988f11f7fad3043c6db1169f05d10f002d12c.zip
u-boot-imx-a46988f11f7fad3043c6db1169f05d10f002d12c.tar.gz
u-boot-imx-a46988f11f7fad3043c6db1169f05d10f002d12c.tar.bz2
spi: cf_qspi: Fixup to_cf_qspi_slave macro
The third parameter of container_of is the name of the member within the struct. Current code only works if the parameter passed to to_cf_qspi_slave named slave. Fix it. Signed-off-by: Axel Lin <axel.lin@ingics.com> Reviewed-by: Jagannadha Sutradharudu Teki <jagannadh.teki@gmail.com>
Diffstat (limited to 'drivers/spi')
-rw-r--r--drivers/spi/cf_qspi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/spi/cf_qspi.c b/drivers/spi/cf_qspi.c
index 6b85633..834c5bd 100644
--- a/drivers/spi/cf_qspi.c
+++ b/drivers/spi/cf_qspi.c
@@ -20,7 +20,7 @@
DECLARE_GLOBAL_DATA_PTR;
#define clamp(x, low, high) (min(max(low, x), high))
-#define to_cf_qspi_slave(s) container_of(s, struct cf_qspi_slave, s)
+#define to_cf_qspi_slave(s) container_of(s, struct cf_qspi_slave, slave)
struct cf_qspi_slave {
struct spi_slave slave; /* Specific bus:cs ID for each device */