]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
mmc: sdhci: fix the compiler warning when disable CONFIG_MMC_SDMA
authorJaehoon Chung <jh80.chung@samsung.com>
Fri, 5 Aug 2016 05:13:36 +0000 (14:13 +0900)
committerJaehoon Chung <jh80.chung@samsung.com>
Fri, 5 Aug 2016 11:48:01 +0000 (20:48 +0900)
When disabled CONFIG_MMC_SDMA, variable caps didn't use.
This patch fixes the compiler error for -Wunused-but-set-variable

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
drivers/mmc/sdhci.c

index 60108fde94618a7721d4282be0fc46b314bb6580..7ddb549e03caea136fd6987d393eecc8706f9d7f 100644 (file)
@@ -575,10 +575,10 @@ int sdhci_bind(struct udevice *dev, struct mmc *mmc, struct mmc_config *cfg)
 #else
 int add_sdhci(struct sdhci_host *host, u32 max_clk, u32 min_clk)
 {
+#ifdef CONFIG_MMC_SDMA
        unsigned int caps;
 
        caps = sdhci_readl(host, SDHCI_CAPABILITIES);
-#ifdef CONFIG_MMC_SDMA
        if (!(caps & SDHCI_CAN_DO_SDMA)) {
                printf("%s: Your controller doesn't support SDMA!!\n",
                       __func__);