]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
video: stm32: remove test on CONFIG_DM_REGULATOR
authorPatrick Delaunay <patrick.delaunay@foss.st.com>
Mon, 20 Jun 2022 09:55:07 +0000 (11:55 +0200)
committerAnatolij Gustschin <agust@denx.de>
Sat, 25 Jun 2022 06:18:42 +0000 (08:18 +0200)
The tests on CONFIG_DM_REGULATOR, added to avoid compilation issues, can
now be removed, they are no more needed since the commit 16cc5ad0b439
("power: regulator: add dummy helper").

Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com>
drivers/video/stm32/stm32_dsi.c

index 134abd93e19b1b41e4f4c9ed3475e7d2d19ef558..5871ac7c4ffa8ff9a670cc44d01f5b94dda32a3a 100644 (file)
@@ -433,19 +433,17 @@ static int stm32_dsi_probe(struct udevice *dev)
                return -EINVAL;
        }
 
-       if (IS_ENABLED(CONFIG_DM_REGULATOR)) {
-               ret =  device_get_supply_regulator(dev, "phy-dsi-supply",
-                                                  &priv->vdd_reg);
-               if (ret && ret != -ENOENT) {
-                       dev_err(dev, "Warning: cannot get phy dsi supply\n");
-                       return -ENODEV;
-               }
+       ret =  device_get_supply_regulator(dev, "phy-dsi-supply",
+                                          &priv->vdd_reg);
+       if (ret && ret != -ENOENT) {
+               dev_err(dev, "Warning: cannot get phy dsi supply\n");
+               return -ENODEV;
+       }
 
-               if (ret != -ENOENT) {
-                       ret = regulator_set_enable(priv->vdd_reg, true);
-                       if (ret)
-                               return ret;
-               }
+       if (ret != -ENOENT) {
+               ret = regulator_set_enable(priv->vdd_reg, true);
+               if (ret)
+                       return ret;
        }
 
        ret = clk_get_by_name(device->dev, "pclk", &clk);
@@ -493,8 +491,7 @@ static int stm32_dsi_probe(struct udevice *dev)
 err_clk:
        clk_disable(&clk);
 err_reg:
-       if (IS_ENABLED(CONFIG_DM_REGULATOR))
-               regulator_set_enable(priv->vdd_reg, false);
+       regulator_set_enable(priv->vdd_reg, false);
 
        return ret;
 }