[RFCv1 5/8] phy: amlogic: meson8b-usb2: Reorder phy poweroff callback function

From: Anand Moon
Date: Thu Jun 17 2021 - 15:44:02 EST


Move the phy_meson8b_usb2_power_off fundtion to avoid compilation
error.

drivers/phy/amlogic/phy-meson8b-usb2.c:247:3: error:
implicit declaration of function 'phy_meson8b_usb2_power_off';

Cc: Martin Blumenstingl <martin.blumenstingl@xxxxxxxxxxxxxx>
Signed-off-by: Anand Moon <linux.amoon@xxxxxxxxx>
---
drivers/phy/amlogic/phy-meson8b-usb2.c | 24 +++++++++++-------------
1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/drivers/phy/amlogic/phy-meson8b-usb2.c b/drivers/phy/amlogic/phy-meson8b-usb2.c
index 18e0986f6ed2..ab23a584d7b7 100644
--- a/drivers/phy/amlogic/phy-meson8b-usb2.c
+++ b/drivers/phy/amlogic/phy-meson8b-usb2.c
@@ -205,6 +205,17 @@ static int phy_meson8b_usb2_setmode(struct phy *phy, enum phy_mode mode,
return 0;
}

+static int phy_meson8b_usb2_power_off(struct phy *phy)
+{
+ struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
+
+ if (priv->dr_mode == USB_DR_MODE_HOST)
+ regmap_update_bits(priv->regmap, REG_DBG_UART,
+ REG_DBG_UART_SET_IDDQ,
+ REG_DBG_UART_SET_IDDQ);
+ return 0;
+}
+
static int phy_meson8b_usb2_power_on(struct phy *phy)
{
struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
@@ -240,19 +251,6 @@ static int phy_meson8b_usb2_power_on(struct phy *phy)
return 0;
}

-static int phy_meson8b_usb2_power_off(struct phy *phy)
-{
- struct phy_meson8b_usb2_priv *priv = phy_get_drvdata(phy);
-
- if (priv->dr_mode == USB_DR_MODE_HOST)
- regmap_update_bits(priv->regmap, REG_DBG_UART,
- REG_DBG_UART_SET_IDDQ,
- REG_DBG_UART_SET_IDDQ);
-
-
- return 0;
-}
-
static const struct phy_ops phy_meson8b_usb2_ops = {
.init = phy_meson8b_usb2_init,
.exit = phy_meson8b_usb2_exit,
--
2.31.1