diff --git a/drivers/net/dsa/ocelot/felix_vsc9959.c b/drivers/net/dsa/ocelot/felix_vsc9959.c
index b1032b7abaea..fbe78357ca94 100644
--- a/drivers/net/dsa/ocelot/felix_vsc9959.c
+++ b/drivers/net/dsa/ocelot/felix_vsc9959.c
@@ -1127,11 +1127,13 @@ static void vsc9959_mdio_bus_free(struct ocelot *ocelot)
for (port = 0; port < ocelot->num_phys_ports; port++) {
struct phylink_pcs *phylink_pcs = felix->pcs[port];
+ struct mdio_device *mdio_device;
if (!phylink_pcs)
continue;
- mdio_device_free(phylink_pcs->mdio);
+ mdio_device = lynx_get_mdio_device(phylink_pcs);
+ mdio_device_free(mdio_device);
lynx_pcs_destroy(phylink_pcs);
}
mdiobus_unregister(felix->imdio);diff --git a/drivers/net/dsa/ocelot/seville_vsc9953.c b/drivers/net/dsa/ocelot/seville_vsc9953.c
index 268c09042824..12a87d8f977d 100644
--- a/drivers/net/dsa/ocelot/seville_vsc9953.c
+++ b/drivers/net/dsa/ocelot/seville_vsc9953.c
@@ -1037,7 +1037,7 @@ static int vsc9953_mdio_bus_alloc(struct ocelot *ocelot)
continue;
mdio_device = mdio_device_create(felix->imdio, addr);
- if (IS_ERR(pcs))
+ if (IS_ERR(mdio_device))
continue;
phylink_pcs = lynx_pcs_create(mdio_device);
@@ -1066,7 +1066,7 @@ static void vsc9953_mdio_bus_free(struct ocelot *ocelot)
if (!phylink_pcs)
continue;
- mdio_device = lynx_pcs_get_mdio(phylink_pcs);
+ mdio_device = lynx_get_mdio_device(phylink_pcs);
mdio_device_free(mdio_device);
lynx_pcs_destroy(phylink_pcs);
}
diff --git a/drivers/net/ethernet/freescale/enetc/enetc_pf.c b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
index 3d93ac1376c6..3ab581b777eb 100644
--- a/drivers/net/ethernet/freescale/enetc/enetc_pf.c
+++ b/drivers/net/ethernet/freescale/enetc/enetc_pf.c
@@ -8,6 +8,7 @@
#include <linux/of_platform.h>
#include <linux/of_mdio.h>
#include <linux/of_net.h>
+#include <linux/pcs-lynx.h>
#include "enetc_ierb.h"
#include "enetc_pf.h"
@@ -983,7 +984,7 @@ static void enetc_pl_mac_config(struct phylink_config *config,
priv = netdev_priv(pf->si->ndev);
if (pf->pcs)
- phylink_set_pcs(priv->phylink, &pf->pcs);
+ phylink_set_pcs(priv->phylink, pf->pcs);
}
static void enetc_force_rgmii_mac(struct enetc_hw *hw, int speed, int duplex)
diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c
index f8d2494b335c..5f9fc9252c79 100644
--- a/drivers/pinctrl/pinctrl-ocelot.c
+++ b/drivers/pinctrl/pinctrl-ocelot.c
@@ -20,6 +20,7 @@
#include <linux/platform_device.h>
#include <linux/regmap.h>
#include <linux/slab.h>
+#include <soc/mscc/ocelot.h>
#include "core.h"
#include "pinconf.h"
diff --git a/include/soc/mscc/ocelot.h b/include/soc/mscc/ocelot.h
index 6aeb7eac73f5..7571becba545 100644
--- a/include/soc/mscc/ocelot.h
+++ b/include/soc/mscc/ocelot.h
@@ -946,11 +946,12 @@ int ocelot_pinctrl_core_probe(struct device *dev,
struct regmap *pincfg_base, u32 pincfg_offset,
struct device_node *device_node);
#else
-int ocelot_pinctrl_core_probe(struct device *dev,
- struct pinctrl_desc *pinctrl_desc,
- struct regmap *regmap_base, u32 regmap_offset,
- struct regmap *pincfg_base, u32 pincfg_offset,
- struct device_node *device_node)
+static inline int
+ocelot_pinctrl_core_probe(struct device *dev,
+ struct pinctrl_desc *pinctrl_desc,
+ struct regmap *regmap_base, u32 regmap_offset,
+ struct regmap *pincfg_base, u32 pincfg_offset,
+ struct device_node *device_node)
{
return -EOPNOTSUPP;
}@@ -960,8 +961,9 @@ int ocelot_pinctrl_core_probe(struct device *dev,
int microchip_sgpio_core_probe(struct device *dev, struct device_node *node,
struct regmap *regmap, u32 offset);
#else
-int microchip_sgpio_core_probe(struct device *dev, struct device_node *node,
- struct regmap *regmap, u32 offset)
+static inline int
+microchip_sgpio_core_probe(struct device *dev, struct device_node *node,
+ struct regmap *regmap, u32 offset)
{
return -EOPNOTSUPP;
}
-- >8 -------------------------------------------------------------------------