diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2014-09-23 09:19:41 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-26 16:49:01 -0400 |
commit | 0a29b3dafbb2fc46421cc2950523814c7c6c8bfb (patch) | |
tree | 4e0cb844ac0877925589276c6be4814a3e163ad0 /drivers/net/ethernet | |
parent | 8280bf00fdd87de876c4add5fa8ed05c18c78a2f (diff) |
net: bcmgenet: Fix compile warning
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>
Diffstat (limited to 'drivers/net/ethernet')
-rw-r--r-- | drivers/net/ethernet/broadcom/genet/bcmgenet.c | 23 |
1 files changed, 7 insertions, 16 deletions
diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c index e8c601d26c64..77cb7555e794 100644 --- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c +++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c | |||
@@ -2017,19 +2017,6 @@ static void bcmgenet_set_hw_addr(struct bcmgenet_priv *priv, | |||
2017 | bcmgenet_umac_writel(priv, (addr[4] << 8) | addr[5], UMAC_MAC1); | 2017 | bcmgenet_umac_writel(priv, (addr[4] << 8) | addr[5], UMAC_MAC1); |
2018 | } | 2018 | } |
2019 | 2019 | ||
2020 | static int bcmgenet_wol_resume(struct bcmgenet_priv *priv) | ||
2021 | { | ||
2022 | /* From WOL-enabled suspend, switch to regular clock */ | ||
2023 | if (priv->wolopts) | ||
2024 | clk_disable_unprepare(priv->clk_wol); | ||
2025 | |||
2026 | phy_init_hw(priv->phydev); | ||
2027 | /* Speed settings must be restored */ | ||
2028 | bcmgenet_mii_config(priv->dev); | ||
2029 | |||
2030 | return 0; | ||
2031 | } | ||
2032 | |||
2033 | /* Returns a reusable dma control register value */ | 2020 | /* Returns a reusable dma control register value */ |
2034 | static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv) | 2021 | static u32 bcmgenet_dma_disable(struct bcmgenet_priv *priv) |
2035 | { | 2022 | { |
@@ -2683,9 +2670,13 @@ static int bcmgenet_resume(struct device *d) | |||
2683 | if (ret) | 2670 | if (ret) |
2684 | goto out_clk_disable; | 2671 | goto out_clk_disable; |
2685 | 2672 | ||
2686 | ret = bcmgenet_wol_resume(priv); | 2673 | /* From WOL-enabled suspend, switch to regular clock */ |
2687 | if (ret) | 2674 | if (priv->wolopts) |
2688 | goto out_clk_disable; | 2675 | clk_disable_unprepare(priv->clk_wol); |
2676 | |||
2677 | phy_init_hw(priv->phydev); | ||
2678 | /* Speed settings must be restored */ | ||
2679 | bcmgenet_mii_config(priv->dev); | ||
2689 | 2680 | ||
2690 | /* disable ethernet MAC while updating its registers */ | 2681 | /* disable ethernet MAC while updating its registers */ |
2691 | umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false); | 2682 | umac_enable_set(priv, CMD_TX_EN | CMD_RX_EN, false); |