* [U-Boot] [PATCH] spi: cf_qspi: Fixup to_cf_qspi_slave macro
@ 2015-01-15 5:32 Axel Lin
2015-02-17 8:47 ` Jagan Teki
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2015-01-15 5:32 UTC (permalink / raw)
To: u-boot
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>
---
drivers/spi/cf_qspi.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 */
--
1.9.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] spi: cf_qspi: Fixup to_cf_qspi_slave macro
2015-01-15 5:32 [U-Boot] [PATCH] spi: cf_qspi: Fixup to_cf_qspi_slave macro Axel Lin
@ 2015-02-17 8:47 ` Jagan Teki
0 siblings, 0 replies; 2+ messages in thread
From: Jagan Teki @ 2015-02-17 8:47 UTC (permalink / raw)
To: u-boot
On 15 January 2015 at 11:02, Axel Lin <axel.lin@ingics.com> wrote:
> 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>
> ---
> drivers/spi/cf_qspi.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> 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 */
> --
> 1.9.1
>
>
>
Applied to u-boot-spi/master
thanks!
--
Jagan.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-02-17 8:47 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-15 5:32 [U-Boot] [PATCH] spi: cf_qspi: Fixup to_cf_qspi_slave macro Axel Lin
2015-02-17 8:47 ` Jagan Teki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox