diff options
author | Chuanhong Guo <gch981213@gmail.com> | 2019-01-10 13:23:42 +0800 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2019-03-24 01:44:25 +0100 |
commit | ebec6c9f857618b0f4a115fa095c5822396a7582 (patch) | |
tree | 8c27dbb70c32e8daab47efa4e420f4238f1763e2 /target | |
parent | 2e6c96a6498e901bfae5d869224135de2672f586 (diff) | |
download | upstream-ebec6c9f857618b0f4a115fa095c5822396a7582.tar.gz upstream-ebec6c9f857618b0f4a115fa095c5822396a7582.tar.bz2 upstream-ebec6c9f857618b0f4a115fa095c5822396a7582.zip |
generic: ar8216: add device struct into struct ar8xxx_priv
dev has been taken up by switch_dev so it's named pdev instead.
Signed-off-by: Chuanhong Guo <gch981213@gmail.com>
Diffstat (limited to 'target')
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.c | 2 | ||||
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8216.h | 1 | ||||
-rw-r--r-- | target/linux/generic/files/drivers/net/phy/ar8327.c | 4 |
3 files changed, 5 insertions, 2 deletions
diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.c b/target/linux/generic/files/drivers/net/phy/ar8216.c index fa33c2032b..10bdf52353 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.c +++ b/target/linux/generic/files/drivers/net/phy/ar8216.c @@ -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) diff --git a/target/linux/generic/files/drivers/net/phy/ar8216.h b/target/linux/generic/files/drivers/net/phy/ar8216.h index 33f505cbe2..140c217c7c 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8216.h +++ b/target/linux/generic/files/drivers/net/phy/ar8216.h @@ -424,6 +424,7 @@ struct ar8xxx_priv { struct switch_dev dev; struct mii_bus *mii_bus; struct phy_device *phy; + struct device *pdev; int (*get_port_link)(unsigned port); diff --git a/target/linux/generic/files/drivers/net/phy/ar8327.c b/target/linux/generic/files/drivers/net/phy/ar8327.c index 6c33229143..36a4520678 100644 --- a/target/linux/generic/files/drivers/net/phy/ar8327.c +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c @@ -662,8 +662,8 @@ ar8327_hw_init(struct ar8xxx_priv *priv) if (!priv->chip_data) return -ENOMEM; - if (priv->phy->mdio.dev.of_node) - ret = ar8327_hw_config_of(priv, priv->phy->mdio.dev.of_node); + if (priv->pdev->of_node) + ret = ar8327_hw_config_of(priv, priv->pdev->of_node); else ret = ar8327_hw_config_pdata(priv, priv->phy->mdio.dev.platform_data); |