summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/freescale
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2013-05-27 07:48:32 +0400
committerDavid S. Miller <davem@davemloft.net>2013-05-28 09:29:54 +0400
commitc55284e4ddf3779f52d730bedfa264d35d42e539 (patch)
tree25873cec87f7694efcf82257ffeebcf7f37ff22d /drivers/net/ethernet/freescale
parentf6a4d607b3fdfaf305f3e78837cb8969d62c249a (diff)
downloadlinux-c55284e4ddf3779f52d730bedfa264d35d42e539.tar.xz
fec: Remove irqs first
During probe the clocks are enabled prior than the acquiring the interrupts. In the remove function we need to do the opposite: first remove the interrupts and then disable the clocks. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/freescale')
-rw-r--r--drivers/net/ethernet/freescale/fec_main.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/ethernet/freescale/fec_main.c b/drivers/net/ethernet/freescale/fec_main.c
index 58ac0c76441f..cac667db61be 100644
--- a/drivers/net/ethernet/freescale/fec_main.c
+++ b/drivers/net/ethernet/freescale/fec_main.c
@@ -2009,6 +2009,11 @@ fec_drv_remove(struct platform_device *pdev)
unregister_netdev(ndev);
fec_enet_mii_remove(fep);
del_timer_sync(&fep->time_keep);
+ for (i = 0; i < FEC_IRQ_NUM; i++) {
+ int irq = platform_get_irq(pdev, i);
+ if (irq > 0)
+ free_irq(irq, ndev);
+ }
if (fep->reg_phy)
regulator_disable(fep->reg_phy);
clk_disable_unprepare(fep->clk_ptp);
@@ -2017,11 +2022,6 @@ fec_drv_remove(struct platform_device *pdev)
clk_disable_unprepare(fep->clk_enet_out);
clk_disable_unprepare(fep->clk_ahb);
clk_disable_unprepare(fep->clk_ipg);
- for (i = 0; i < FEC_IRQ_NUM; i++) {
- int irq = platform_get_irq(pdev, i);
- if (irq > 0)
- free_irq(irq, ndev);
- }
free_netdev(ndev);
platform_set_drvdata(pdev, NULL);