r8169: replace mii_bus member with phy_device member in struct rtl8169_private
authorHeiner Kallweit <hkallweit1@gmail.com>
Sat, 19 Jan 2019 21:07:05 +0000 (22:07 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 20 Jan 2019 00:09:14 +0000 (16:09 -0800)
commit703732f0058bd48842aa882217c26a3b3ed30216
tree50b4f83276c0a3a76fc4b493487c4cccd2848200
parent58ba566ccbae0ec629ab9e36006d1b79765fe252
r8169: replace mii_bus member with phy_device member in struct rtl8169_private

Accessing the phy_device indirectly via the netdevice causes few issues:
- Accessing the phy_device when it's not attached may cause a NPE.
- If we have to access the phy_device when it's not attached we have
  to use mdiobus_get_phy() to get a reference to the phy_device.

Therefore store a phy_device reference in struct rtl8169_private directly.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/realtek/r8169.c