[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250422063638.3091321-1-johannes.schneider@leica-geosystems.com>
Date: Tue, 22 Apr 2025 08:36:38 +0200
From: Johannes Schneider <johannes.schneider@...ca-geosystems.com>
To: dmurphy@...com
Cc: andrew@...n.ch,
davem@...emloft.net,
f.fainelli@...il.com,
hkallweit1@...il.com,
kuba@...nel.org,
linux-kernel@...r.kernel.org,
linux@...linux.org.uk,
michael@...le.cc,
netdev@...r.kernel.org,
bsp-development.geo@...ca-geosystems.com,
Johannes Schneider <johannes.schneider@...ca-geosystems.com>
Subject: [PATCH net] net: dp83822: Fix OF_MDIO config check
When CONFIG_OF_MDIO is set to be a module the code block is not
compiled. Use the IS_ENABLED macro that checks for both built in as
well as module.
Fixes: 5dc39fd ("net: phy: DP83822: Add ability to advertise Fiber connection")
Signed-off-by: Johannes Schneider <johannes.schneider@...ca-geosystems.com>
---
drivers/net/phy/dp83822.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/phy/dp83822.c b/drivers/net/phy/dp83822.c
index 6599feca1967..f1179881abb4 100644
--- a/drivers/net/phy/dp83822.c
+++ b/drivers/net/phy/dp83822.c
@@ -719,7 +719,7 @@ static int dp83822_phy_reset(struct phy_device *phydev)
return phydev->drv->config_init(phydev);
}
-#ifdef CONFIG_OF_MDIO
+#if IS_ENABLED(CONFIG_OF_MDIO)
static int dp83822_of_init_leds(struct phy_device *phydev)
{
struct device_node *node = phydev->mdio.dev.of_node;
--
2.34.1
Powered by blists - more mailing lists