treewide: Try to avoid the preprocessor with OF_REAL
[platform/kernel/u-boot.git] / drivers / mmc / rockchip_dw_mmc.c
index fa297a0..855c0e7 100644 (file)
@@ -52,10 +52,12 @@ static uint rockchip_dwmmc_get_mmc_clk(struct dwmci_host *host, uint freq)
 
 static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
 {
-#if CONFIG_IS_ENABLED(OF_REAL)
        struct rockchip_dwmmc_priv *priv = dev_get_priv(dev);
        struct dwmci_host *host = &priv->host;
 
+       if (!CONFIG_IS_ENABLED(OF_REAL))
+               return 0;
+
        host->name = dev->name;
        host->ioaddr = dev_read_addr_ptr(dev);
        host->buswidth = dev_read_u32_default(dev, "bus-width", 4);
@@ -95,7 +97,7 @@ static int rockchip_dwmmc_of_to_plat(struct udevice *dev)
                debug("%s: 'clock-freq-min-max' property was deprecated.\n",
                      __func__);
        }
-#endif
+
        return 0;
 }