From: Russell King Date: Thu, 24 Sep 2015 19:36:08 +0000 (+0100) Subject: phy: add proper phy struct device refcounting X-Git-Tag: omap-for-v4.3/fixes-rc5~84^2~5^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7322967bc1bd97ac9c49ecea19e5a1f681ca27ee;p=pandora-kernel.git 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 Signed-off-by: David S. Miller --- Reading git-diff-tree failed