net: bcmgenet: Fix compile warning
authorTobias Klauser <tklauser@distanz.ch>
Tue, 23 Sep 2014 13:19:41 +0000 (15:19 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Sep 2014 20:49:01 +0000 (16:49 -0400)
bcmgenet_wol_resume() is only used in bcmgenet_resume(), which is only
defined when CONFIG_PM_SLEEP is enabled. This leads to the following
compile warning when building with !CONFIG_PM_SLEEP:

drivers/net/ethernet/broadcom/genet/bcmgenet.c:1967:12: warning: ‘bcmgenet_wol_resume’ defined but not used [-Wunused-function]

Since bcmgenet_resume() is the only user of bcmgenet_wol_resume(), fix
this by directly inlining the function there.

Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/broadcom/genet/bcmgenet.c

index e8c601d26c6488822aafffd4717e27f0db2268e2..77cb7555e79474b6e191addce2cf4757347bc75c 100644 (file)
@@ -2017,19 +2017,6 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv,
        bcmgenet_umac_writel(priv, (addr[4] << 8) | addr[5], UMAC_MAC1);
 }
 
-static int bcmgenet_wol_resume(struct bcmgenet_priv *priv)
-{
-       /* From WOL-enabled suspend, switch to regular clock */
-       if (priv->wolopts)
-               clk_disable_unprepare(priv->clk_wol);
-
-       phy_init_hw(priv->phydev);
-       /* Speed settings must be restored */
-       bcmgenet_mii_config(priv->dev);
-
-       return 0;
-}
-
 /* Returns a reusable dma control register value */
 static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv)
 {
@@ -2683,9 +2670,13 @@ static int bcmgenet_resume(struct device *d)
        if (ret)
                goto out_clk_disable;
 
-       ret = bcmgenet_wol_resume(priv);
-       if (ret)
-               goto out_clk_disable;
+       /* From WOL-enabled suspend, switch to regular clock */
+       if (priv->wolopts)
+               clk_disable_unprepare(priv->clk_wol);
+
+       phy_init_hw(priv->phydev);
+       /* Speed settings must be restored */
+       bcmgenet_mii_config(priv->dev);
 
        /* disable ethernet MAC while updating its registers */
        umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false);