Skip to content

Commit d1bd330

Browse files
bwh-ctdavem330
authored andcommitted
of_mdio: Enable fixed PHY support if driver is a module
The fixed_phy driver doesn't have to be built-in, and it's important that of_mdio supports it even if it's a module. Signed-off-by: Ben Hutchings <ben.hutchings@codethink.co.uk> Acked-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 8658aaf commit d1bd330

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/of/of_mdio.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ struct phy_device *of_phy_attach(struct net_device *dev,
361361
}
362362
EXPORT_SYMBOL(of_phy_attach);
363363

364-
#if defined(CONFIG_FIXED_PHY)
364+
#if IS_ENABLED(CONFIG_FIXED_PHY)
365365
/*
366366
* of_phy_is_fixed_link() and of_phy_register_fixed_link() must
367367
* support two DT bindings:

include/linux/of_mdio.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ static inline int of_mdio_parse_addr(struct device *dev,
6969
}
7070
#endif /* CONFIG_OF */
7171

72-
#if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY)
72+
#if defined(CONFIG_OF) && IS_ENABLED(CONFIG_FIXED_PHY)
7373
extern int of_phy_register_fixed_link(struct device_node *np);
7474
extern bool of_phy_is_fixed_link(struct device_node *np);
7575
#else

0 commit comments

Comments
 (0)