]> git.baikalelectronics.ru Git - kernel.git/commit
net: qcom/emac: grab a reference to the phydev on ACPI systems
authorTimur Tabi <timur@codeaurora.org>
Wed, 11 Jan 2017 22:45:51 +0000 (16:45 -0600)
committerDavid S. Miller <davem@davemloft.net>
Thu, 12 Jan 2017 20:13:18 +0000 (15:13 -0500)
commitf7506b61f0ef414c0e95c887a8d19c36fecc4fed
tree4fd095c82f487d1939d8201945e4334e4bdc3796
parent35322140909993abc2e0618b7f56858f003990b4
net: qcom/emac: grab a reference to the phydev on ACPI systems

Commit 57c4e5b330ab ("net: qcom/emac: fix of_node and phydev leaks")
fixed the problem with reference leaks on phydev, but the fix is
device-tree specific.  When the driver unloads, the reference is
dropped only on DT systems.

Instead, it's cleaner if up grab an reference on ACPI systems.
When the driver unloads, we can drop the reference without having
to check whether we're on a DT system.

Signed-off-by: Timur Tabi <timur@codeaurora.org>
Reviewed-by: Johan Hovold <johan@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/qualcomm/emac/emac-phy.c
drivers/net/ethernet/qualcomm/emac/emac.c