From dbb713baa608d3397e56bc32b26d2efe07c756ee Mon Sep 17 00:00:00 2001 From: Gabor Juhos Date: Sun, 26 May 2013 12:11:27 +0200 Subject: mmc: ftsdc010_mci: fix build error if CONFIG_FTSDC010_SDIO is not defined The FTSDC010_DCR_FIFO_RST symbol is conditionally defined in and it is available available when CONFIG_FTSDC010_SDIO is enabled. However the actual driver code unconditionally uses the FTSDC010_DCR_FIFO_RST constant and this causes build error if CONFIG_FTSDC010_SDIO is not enabled. The following error happens when compiling for the adp-ag101 board: ftsdc010_mci.c: In function 'ftsdc010_request': ftsdc010_mci.c:178: error: 'FTSDC010_DCR_FIFO_RST' undeclared (first use in this function) ftsdc010_mci.c:178: error: (Each undeclared identifier is reported only once ftsdc010_mci.c:178: error: for each function it appears in.) The patch ensures that the FTSDC010_DCR_FIFO_RST symbol gets used only if CONFIG_FTSDC010_SDIO is defined. Compile tested only. Cc: Kuo-Jung Su Cc: Macpaul Lin Signed-off-by: Gabor Juhos Reviewed-by: Kuo-Jung Su --- drivers/mmc/ftsdc010_mci.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/mmc/ftsdc010_mci.c') diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index 562b14aff8..1fcb97c184 100644 --- a/drivers/mmc/ftsdc010_mci.c +++ b/drivers/mmc/ftsdc010_mci.c @@ -175,7 +175,11 @@ static int ftsdc010_request(struct mmc *mmc, struct mmc_cmd *cmd, len = data->blocksize * data->blocks; /* 1. data disable + fifo reset */ - writel(FTSDC010_DCR_FIFO_RST, ®s->dcr); + dcr = 0; +#ifdef CONFIG_FTSDC010_SDIO + dcr |= FTSDC010_DCR_FIFO_RST; +#endif + writel(dcr, ®s->dcr); /* 2. clear status register */ writel(FTSDC010_STATUS_DATA_MASK | FTSDC010_STATUS_FIFO_URUN -- cgit v1.2.1 From 1a4596601fd395f3afb8f82f3f840c5e00bdd57a Mon Sep 17 00:00:00 2001 From: Wolfgang Denk Date: Mon, 8 Jul 2013 09:37:19 +0200 Subject: Add GPL-2.0+ SPDX-License-Identifier to source files Signed-off-by: Wolfgang Denk [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini --- drivers/mmc/ftsdc010_mci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'drivers/mmc/ftsdc010_mci.c') diff --git a/drivers/mmc/ftsdc010_mci.c b/drivers/mmc/ftsdc010_mci.c index 562b14aff8..f7b54b2555 100644 --- a/drivers/mmc/ftsdc010_mci.c +++ b/drivers/mmc/ftsdc010_mci.c @@ -4,8 +4,7 @@ * (C) Copyright 2010 Faraday Technology * Dante Su * - * This file is released under the terms of GPL v2 and any later version. - * See the file COPYING in the root directory of the source tree for details. + * SPDX-License-Identifier: GPL-2.0+ */ #include -- cgit v1.2.1