net: fec: fix unbalanced clk disable on driver unbind

When the driver is removed (e.g. using unbind through sysfs), the
clocks get disabled twice, once on fec_enet_close and once on
fec_drv_remove. Since the clocks are enabled only once, this leads
to a warning:

WARNING: CPU: 0 PID: 402 at drivers/clk/clk.c:992 clk_core_disable+0x64/0x68()

Remove the call to fec_enet_clk_enable in fec_drv_remove to balance
the clock enable/disable calls again. This has been introduce by
e8fcfcd568 ("net: fec: optimize the clock management to save power").

Signed-off-by: Stefan Agner <stefan@agner.ch>
Acked-by: Fugang Duan <B38611@freescale.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Stefan Agner 2015-03-05 15:09:29 +01:00 коммит произвёл David S. Miller
Родитель d941bebf5e
Коммит e9647d1e74
1 изменённых файлов: 0 добавлений и 1 удалений

Просмотреть файл

@ -3383,7 +3383,6 @@ fec_drv_remove(struct platform_device *pdev)
regulator_disable(fep->reg_phy); regulator_disable(fep->reg_phy);
if (fep->ptp_clock) if (fep->ptp_clock)
ptp_clock_unregister(fep->ptp_clock); ptp_clock_unregister(fep->ptp_clock);
fec_enet_clk_enable(ndev, false);
of_node_put(fep->phy_node); of_node_put(fep->phy_node);
free_netdev(ndev); free_netdev(ndev);