mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-28 17:48:58 +00:00
db345220b4
Refreshed all patches. Altered patches: - 707-dpaa-ethernet-support-layerscape.patch Remove upstreamed: - 034-v4.20-MIPS-BCM47XX-Enable-USB-power-on-Netgear-WNDR3400v3.patch - 001-4.21-01-BCM63XX-fix-switch-core-reset-on-BCM6368.patch - 073-qcom-ipq4019-fix-cpu0-s-qcom-saw2-reg-value.patch Compile-tested on: cns3xxx Runtime-tested on: cns3xxx Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 555baec974ede81e616ca88ac6d3fca09239368f Mon Sep 17 00:00:00 2001
|
|
From: Jonas Gorski <jonas.gorski@gmail.com>
|
|
Date: Tue, 18 Jul 2017 13:18:01 +0200
|
|
Subject: [PATCH 5/6] bcm63xx_enet: drop unneeded NULL phy_clk check
|
|
|
|
clk_disable and clk_unprepare are NULL-safe, so need to duplicate the
|
|
NULL check of the functions.
|
|
|
|
Signed-off-by: Jonas Gorski <jonas.gorski@gmail.com>
|
|
---
|
|
drivers/net/ethernet/broadcom/bcm63xx_enet.c | 7 ++-----
|
|
1 file changed, 2 insertions(+), 5 deletions(-)
|
|
|
|
--- a/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
|
+++ b/drivers/net/ethernet/broadcom/bcm63xx_enet.c
|
|
@@ -1905,8 +1905,7 @@ out_free_mdio:
|
|
out_uninit_hw:
|
|
/* turn off mdc clock */
|
|
enet_writel(priv, 0, ENET_MIISC_REG);
|
|
- if (priv->phy_clk)
|
|
- clk_disable_unprepare(priv->phy_clk);
|
|
+ clk_disable_unprepare(priv->phy_clk);
|
|
|
|
out_disable_clk_mac:
|
|
clk_disable_unprepare(priv->mac_clk);
|
|
@@ -1945,9 +1944,7 @@ static int bcm_enet_remove(struct platfo
|
|
}
|
|
|
|
/* disable hw block clocks */
|
|
- if (priv->phy_clk)
|
|
- clk_disable_unprepare(priv->phy_clk);
|
|
-
|
|
+ clk_disable_unprepare(priv->phy_clk);
|
|
clk_disable_unprepare(priv->mac_clk);
|
|
|
|
free_netdev(dev);
|