aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-16 22:56:06 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2021-02-16 23:42:43 +0100
commit0e407dfe8bac1475f8f963dff699e434bbbeb4d5 (patch)
treebf80742923dfacdcc06c4f10c51af59468859061
parenta24df045db87875e914bbefa4ead2af868e92eeb (diff)
downloadupstream-0e407dfe8bac1475f8f963dff699e434bbbeb4d5.tar.gz
upstream-0e407dfe8bac1475f8f963dff699e434bbbeb4d5.tar.bz2
upstream-0e407dfe8bac1475f8f963dff699e434bbbeb4d5.zip
generic: ar8216: update version switch for of_get_phy_mode fix
Kernel has changed the of_get_phy_mode API in commit 0c65b2b90d13 ("net: of_get_phy_mode: Change API to solve int/unit warnings"). This is already included in kernel 5.5, so fix the version switch (though this will not actually matter for the versions we support). Similar driver adjustments to account for the API change will probably be necessary to various other local drivers. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de>
-rw-r--r--target/linux/generic/files/drivers/net/phy/ar8216.c4
1 files changed, 2 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 d48a415d50..ef0fc54949 100644
--- a/target/linux/generic/files/drivers/net/phy/ar8216.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8216.c
@@ -891,7 +891,7 @@ ar8216_phy_write(struct ar8xxx_priv *priv, int addr, int regnum, u16 val)
static int
ar8229_hw_init(struct ar8xxx_priv *priv)
{
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
phy_interface_t phy_if_mode;
#else
int phy_if_mode;
@@ -903,7 +903,7 @@ ar8229_hw_init(struct ar8xxx_priv *priv)
ar8xxx_write(priv, AR8216_REG_CTRL, AR8216_CTRL_RESET);
ar8xxx_reg_wait(priv, AR8216_REG_CTRL, AR8216_CTRL_RESET, 0, 1000);
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 10, 0)
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 5, 0)
of_get_phy_mode(priv->pdev->of_node, &phy_if_mode);
#else
phy_if_mode = of_get_phy_mode(priv->pdev->of_node);