[PATCH 35/42] mmc: exynos_dw_mmc: Use CONFIG_IS_ENABLED() to check config options
Sam Protsenko
semen.protsenko at linaro.org
Thu May 23 01:31:28 CEST 2024
Use CONFIG_IS_ENABLED() macro to check config options as recommended by
checkpatch, instead of checking those with just #ifdef CONFIG_...
No functional change.
Signed-off-by: Sam Protsenko <semen.protsenko at linaro.org>
---
drivers/mmc/exynos_dw_mmc.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/mmc/exynos_dw_mmc.c b/drivers/mmc/exynos_dw_mmc.c
index e416fbe5397a..b7c3b356f0ac 100644
--- a/drivers/mmc/exynos_dw_mmc.c
+++ b/drivers/mmc/exynos_dw_mmc.c
@@ -28,7 +28,7 @@
/* Quirks */
#define DWMCI_QUIRK_DISABLE_SMU BIT(0)
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
#include <dm.h>
DECLARE_GLOBAL_DATA_PTR;
@@ -47,7 +47,7 @@ struct exynos_dwmmc_variant {
/* Exynos implmentation specific drver private data */
struct dwmci_exynos_priv_data {
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
struct dwmci_host host;
#endif
struct clk clk;
@@ -59,7 +59,7 @@ struct dwmci_exynos_priv_data {
static struct dwmci_exynos_priv_data *exynos_dwmmc_get_priv(
struct dwmci_host *host)
{
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
return container_of(host, struct dwmci_exynos_priv_data, host);
#else
return host->priv;
@@ -231,7 +231,7 @@ static int exynos_dwmci_core_init(struct dwmci_host *host)
host->clksel = exynos_dwmci_clksel;
host->get_mmc_clk = exynos_dwmci_get_clk;
-#ifndef CONFIG_DM_MMC
+#if !CONFIG_IS_ENABLED(DM_MMC)
/* Add the mmc channel to be registered with mmc core */
if (add_dwmci(host, DWMMC_MAX_FREQ, DWMMC_MIN_FREQ)) {
printf("DWMMC%d registration failed\n", host->dev_index);
@@ -338,7 +338,7 @@ static int exynos_dwmmc_of_to_plat(struct udevice *dev)
return 0;
}
-#ifdef CONFIG_DM_MMC
+#if CONFIG_IS_ENABLED(DM_MMC)
static int exynos_dwmmc_probe(struct udevice *dev)
{
struct exynos_mmc_plat *plat = dev_get_plat(dev);
--
2.39.2
More information about the U-Boot
mailing list