treewide: Try to avoid the preprocessor with OF_REAL
[platform/kernel/u-boot.git] / drivers / clk / rockchip / clk_rk3399.c
index 209c726..7d31a9f 100644 (file)
@@ -1402,11 +1402,12 @@ static int rk3399_clk_probe(struct udevice *dev)
 
 static int rk3399_clk_of_to_plat(struct udevice *dev)
 {
-#if CONFIG_IS_ENABLED(OF_REAL)
-       struct rk3399_clk_priv *priv = dev_get_priv(dev);
+       if (CONFIG_IS_ENABLED(OF_REAL)) {
+               struct rk3399_clk_priv *priv = dev_get_priv(dev);
+
+               priv->cru = dev_read_addr_ptr(dev);
+       }
 
-       priv->cru = dev_read_addr_ptr(dev);
-#endif
        return 0;
 }
 
@@ -1614,11 +1615,12 @@ static int rk3399_pmuclk_probe(struct udevice *dev)
 
 static int rk3399_pmuclk_of_to_plat(struct udevice *dev)
 {
-#if CONFIG_IS_ENABLED(OF_REAL)
-       struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
+       if (CONFIG_IS_ENABLED(OF_REAL)) {
+               struct rk3399_pmuclk_priv *priv = dev_get_priv(dev);
+
+               priv->pmucru = dev_read_addr_ptr(dev);
+       }
 
-       priv->pmucru = dev_read_addr_ptr(dev);
-#endif
        return 0;
 }