commit | 7322967bc1bd97ac9c49ecea19e5a1f681ca27ee | [log] [tgz] |
---|---|---|
author | Russell King <rmk+kernel@arm.linux.org.uk> | Thu Sep 24 20:36:08 2015 +0100 |
committer | David S. Miller <davem@davemloft.net> | Thu Sep 24 23:04:52 2015 -0700 |
tree | 8dbce2e4e1eb98757ef30b537977d447999b1582 | |
parent | 3e3aaf649416988ca8be4ad2c52dc24d8be7b46e [diff] |
phy: add proper phy struct device refcounting Take a refcount on the phy struct device when the phy device is attached to a network device, and drop it after it's detached. This ensures that a refcount is held on the phy device while the device is being used by a network device, thereby preventing the phy_device from being unexpectedly kfree()'d by phy_device_release(). Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk> Signed-off-by: David S. Miller <davem@davemloft.net>