diff mbox series

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

Message ID 20210617194154.2397-6-linux.amoon@gmail.com (mailing list archive)
State New, archived
Headers show
Series Meson-8b and Meson-gxbb USB phy code re-structure | expand

Commit Message

Anand Moon June 17, 2021, 7:41 p.m. UTC
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@googlemail.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 drivers/phy/amlogic/phy-meson8b-usb2.c | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

Comments

Martin Blumenstingl June 17, 2021, 10:16 p.m. UTC | #1
Hi Anand,

On Thu, Jun 17, 2021 at 9:44 PM Anand Moon <linux.amoon@gmail.com> wrote:
>
> 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';
you have introduced this warning in patch #4 of this series


Best regards,
Martin
Anand Moon June 18, 2021, 3:33 p.m. UTC | #2
Hi Martin,

On Fri, 18 Jun 2021 at 03:47, Martin Blumenstingl
<martin.blumenstingl@googlemail.com> wrote:
>
> Hi Anand,
>
> On Thu, Jun 17, 2021 at 9:44 PM Anand Moon <linux.amoon@gmail.com> wrote:
> >
> > 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';
> you have introduced this warning in patch #4 of this series
>
>

Oops, I simply needed a forward declaration of the function to resolve
the issue.

> Best regards,
> Martin

Thanks


-Anand
diff mbox series

Patch

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,