]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
net: dp83822: Fix OF_MDIO config check
authorJohannes Schneider <johannes.schneider@leica-geosystems.com>
Wed, 23 Apr 2025 04:47:24 +0000 (06:47 +0200)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Apr 2025 09:19:35 +0000 (11:19 +0200)
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: 5dc39fd5ef35 ("net: phy: DP83822: Add ability to advertise Fiber connection")
Signed-off-by: Johannes Schneider <johannes.schneider@leica-geosystems.com>
Reviewed-by: Maxime Chevallier <maxime.chevallier@bootlin.com>
Link: https://patch.msgid.link/20250423044724.1284492-1-johannes.schneider@leica-geosystems.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/phy/dp83822.c

index 14f36154963841dff98be5af4dfbd2760325c13d..e32013eb0186ff8658cf7bf566aa2055c698d4ec 100644 (file)
@@ -730,7 +730,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 const u32 tx_amplitude_100base_tx_gain[] = {
        80, 82, 83, 85, 87, 88, 90, 92,
        93, 95, 97, 98, 100, 102, 103, 105,