diff options
author | Timur Tabi <timur@codeaurora.org> | 2016-09-28 11:58:42 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-29 01:50:13 -0400 |
commit | 54e19bc74f3380d414681762ceed9f7245bc6a6e (patch) | |
tree | d633a3bdbc9839a376b96484e3c13fb29708de73 /drivers/net/ethernet/qualcomm/emac/emac.c | |
parent | 484611357c19f9e19ef742ebef4505a07d243cc9 (diff) |
net: qcom/emac: do not use devm on internal phy pdev
The platform_device returned by of_find_device_by_node() is not
automatically released when the driver unprobes. Therefore,
managed calls like devm_ioremap_resource() should not be used.
Instead, we manually allocate the resources and then free them
on driver release.
Signed-off-by: Timur Tabi <timur@codeaurora.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/qualcomm/emac/emac.c')
-rw-r--r-- | drivers/net/ethernet/qualcomm/emac/emac.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/qualcomm/emac/emac.c b/drivers/net/ethernet/qualcomm/emac/emac.c index e47d38701d6c..429b4cb59ac4 100644 --- a/drivers/net/ethernet/qualcomm/emac/emac.c +++ b/drivers/net/ethernet/qualcomm/emac/emac.c @@ -723,6 +723,10 @@ static int emac_remove(struct platform_device *pdev) mdiobus_unregister(adpt->mii_bus); free_netdev(netdev); + if (adpt->phy.digital) + iounmap(adpt->phy.digital); + iounmap(adpt->phy.base); + return 0; } |