Commit 7f32541c authored by Alexander Graf's avatar Alexander Graf Committed by David S. Miller

phy dp83867: Fix compilation with CONFIG_OF_MDIO=m

When CONFIG_OF_MDIO is configured as module, the #define for it really
is CONFIG_OF_MDIO_MODULE, not CONFIG_OF_MDIO. So if we are compiling it
as module, the dp83867 doesn't see that OF_MDIO was selected and doesn't
read the dt rgmii parameters.

The fix is simple: Use IS_ENABLED(). It checks for both - module as well
as compiled in code.
Signed-off-by: default avatarAlexander Graf <agraf@suse.de>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08a6ee58
......@@ -99,7 +99,7 @@ static int dp83867_config_intr(struct phy_device *phydev)
return phy_write(phydev, MII_DP83867_MICR, micr_status);
}
#ifdef CONFIG_OF_MDIO
#if IS_ENABLED(CONFIG_OF_MDIO)
static int dp83867_of_init(struct phy_device *phydev)
{
struct dp83867_private *dp83867 = phydev->priv;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment