generic: ar8216: add device struct into struct ar8xxx_priv
[openwrt/staging/mkresin.git] / target / linux / generic / files / drivers / net / phy / ar8216.c
index fa33c2032b59e60f459a202cec702f3ff3dc194c..10bdf523531b1655188487dc29f4b905e171d60b 100644 (file)
@@ -23,6 +23,7 @@
 #include <linux/skbuff.h>
 #include <linux/netdevice.h>
 #include <linux/netlink.h>
+#include <linux/of_device.h>
 #include <linux/bitops.h>
 #include <net/genetlink.h>
 #include <linux/switch.h>
@@ -2205,6 +2206,7 @@ ar8xxx_phy_probe(struct phy_device *phydev)
        }
 
        priv->mii_bus = phydev->mdio.bus;
+       priv->pdev = &phydev->mdio.dev;
 
        ret = ar8xxx_probe_switch(priv);
        if (ret)