diff options
author | Patrick Delaunay <patrick.delaunay@foss.st.com> | 2022-06-20 11:55:07 +0200 |
---|---|---|
committer | Anatolij Gustschin <agust@denx.de> | 2022-06-25 08:18:42 +0200 |
commit | 5bc6f8c2a97e5dd3b94e8c3cff3a77c2f5bffd8d (patch) | |
tree | 9caab0de4f5e3d2aaa3cf8fc0a4ff28ead895e16 | |
parent | 5f71b2f105e5d71e0c5204ba9b1b4def48733af7 (diff) | |
download | u-boot-5bc6f8c2a97e5dd3b94e8c3cff3a77c2f5bffd8d.zip u-boot-5bc6f8c2a97e5dd3b94e8c3cff3a77c2f5bffd8d.tar.gz u-boot-5bc6f8c2a97e5dd3b94e8c3cff3a77c2f5bffd8d.tar.bz2 |
video: stm32: remove test on CONFIG_DM_REGULATOR
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>
-rw-r--r-- | drivers/video/stm32/stm32_dsi.c | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c index 134abd9..5871ac7 100644 --- a/drivers/video/stm32/stm32_dsi.c +++ b/drivers/video/stm32/stm32_dsi.c @@ -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; } |