diff mbox series

[1/2] phy: meson-g12a-usb2: fix the potential build warning

Message ID 20201106055748.20042-2-jh80.chung@samsung.com
State Accepted, archived
Commit 85c9a7ba8c8dcac3fc01bd6af21a93b65d496621
Delegated to: Neil Armstrong
Headers show
Series Fix the potential warning without DM_REGULATOR | expand

Commit Message

Jaehoon Chung Nov. 6, 2020, 5:57 a.m. UTC
Fix the potential build warning.

Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
---
 drivers/phy/meson-g12a-usb2.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/phy/meson-g12a-usb2.c b/drivers/phy/meson-g12a-usb2.c
index a1e621975867..447ce7283db2 100644
--- a/drivers/phy/meson-g12a-usb2.c
+++ b/drivers/phy/meson-g12a-usb2.c
@@ -66,10 +66,10 @@  struct phy_meson_g12a_usb2_priv {
 
 static int phy_meson_g12a_usb2_power_on(struct phy *phy)
 {
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	struct udevice *dev = phy->dev;
 	struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
 
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	if (priv->phy_supply) {
 		int ret = regulator_set_enable(priv->phy_supply, true);
 		if (ret)
@@ -82,10 +82,10 @@  static int phy_meson_g12a_usb2_power_on(struct phy *phy)
 
 static int phy_meson_g12a_usb2_power_off(struct phy *phy)
 {
+#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	struct udevice *dev = phy->dev;
 	struct phy_meson_g12a_usb2_priv *priv = dev_get_priv(dev);
 
-#if CONFIG_IS_ENABLED(DM_REGULATOR)
 	if (priv->phy_supply) {
 		int ret = regulator_set_enable(priv->phy_supply, false);
 		if (ret) {