* [PATCH] video: stm32: remove test on CONFIG_DM_REGULATOR
@ 2022-06-20 9:55 Patrick Delaunay
2022-06-25 7:10 ` Anatolij Gustschin
0 siblings, 1 reply; 2+ messages in thread
From: Patrick Delaunay @ 2022-06-20 9:55 UTC (permalink / raw)
To: u-boot
Cc: Patrick Delaunay, Anatolij Gustschin, Patrice Chotard,
Simon Glass, U-Boot STM32, Yannick Fertré
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 | 25 +++++++++++--------------
1 file changed, 11 insertions(+), 14 deletions(-)
diff --git a/drivers/video/stm32/stm32_dsi.c b/drivers/video/stm32/stm32_dsi.c
index 134abd93e19..5871ac7c4ff 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;
}
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] video: stm32: remove test on CONFIG_DM_REGULATOR
2022-06-20 9:55 [PATCH] video: stm32: remove test on CONFIG_DM_REGULATOR Patrick Delaunay
@ 2022-06-25 7:10 ` Anatolij Gustschin
0 siblings, 0 replies; 2+ messages in thread
From: Anatolij Gustschin @ 2022-06-25 7:10 UTC (permalink / raw)
To: Patrick Delaunay
Cc: u-boot, Patrice Chotard, Simon Glass, U-Boot STM32, Yannick Fertré
On Mon, 20 Jun 2022 11:55:07 +0200
Patrick Delaunay patrick.delaunay@foss.st.com wrote:
> 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 | 25 +++++++++++--------------
> 1 file changed, 11 insertions(+), 14 deletions(-)
>
applied to u-boot-video/master, thanks!
--
Anatolij
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-06-25 7:10 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 9:55 [PATCH] video: stm32: remove test on CONFIG_DM_REGULATOR Patrick Delaunay
2022-06-25 7:10 ` Anatolij Gustschin
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.