From: Masahiro Yamada Date: Wed, 22 Apr 2020 15:34:01 +0000 (+0900) Subject: mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK X-Git-Tag: block-5.8-2020-06-11~27^2~86 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=ca2d13ec6ee9c3d7edc6563dc753f891521f791b;p=linux-2.6-block.git mmc: sdhci-of-at91: make MMC_SDHCI_OF_AT91 depend on HAVE_CLK If sdhci-of-at91.c is compiled without CONFIG_HAVE_CLK, the line caps1 |= FIELD_PREP(SDHCI_CLOCK_MUL_MASK, clk_mul); ... emits "FIELD_PREP: value too large for the field" warning. The compiler seems to decide clk_mul is constant (unsigned int)-1, because clk_get_rate() returns 0 when CONFIG_HAVE_CLK is disabled. Add HAVE_CLK to the depenency since this driver does not work without the clock APIs anyway. Reported-by: Randy Dunlap Suggested-by: Adrian Hunter Signed-off-by: Masahiro Yamada Link: https://lore.kernel.org/r/20200422153401.7913-1-yamada.masahiro@socionext.com Signed-off-by: Ulf Hansson Acked-by: Randy Dunlap # build-tested --- diff --git a/drivers/mmc/host/Kconfig b/drivers/mmc/host/Kconfig index 462b5352fea7..2aee844722d6 100644 --- a/drivers/mmc/host/Kconfig +++ b/drivers/mmc/host/Kconfig @@ -171,7 +171,7 @@ config MMC_SDHCI_OF_ASPEED config MMC_SDHCI_OF_AT91 tristate "SDHCI OF support for the Atmel SDMMC controller" depends on MMC_SDHCI_PLTFM - depends on OF + depends on OF && HAVE_CLK help This selects the Atmel SDMMC driver