Skip to content

Commit 6be4b0d

Browse files
Fabio Estevamolofj
authored andcommitted
ARM: imx: mach-imx6ul: Fix allmodconfig build
We should call phy_register_fixup_for_uid() only when CONFIG_PHYLIB is built-in, otherwise we get the following link error when building allmodconfig: arch/arm/mach-imx/built-in.o: In function `imx6ul_init_machine': :(.init.text+0xa714): undefined reference to `phy_register_fixup_for_uid' This is the same approach done in mach-imx6q.c and mach-imx6sx.c. Reported-by: Olof Johansson <[email protected]> Signed-off-by: Fabio Estevam <[email protected]> Acked-by: Shawn Guo <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
1 parent 443d792 commit 6be4b0d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

arch/arm/mach-imx/mach-imx6ul.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,9 @@ static int ksz8081_phy_fixup(struct phy_device *dev)
4545

4646
static void __init imx6ul_enet_phy_init(void)
4747
{
48-
phy_register_fixup_for_uid(PHY_ID_KSZ8081, 0xffffffff, ksz8081_phy_fixup);
48+
if (IS_BUILTIN(CONFIG_PHYLIB))
49+
phy_register_fixup_for_uid(PHY_ID_KSZ8081, 0xffffffff,
50+
ksz8081_phy_fixup);
4951
}
5052

5153
static inline void imx6ul_enet_init(void)

0 commit comments

Comments
 (0)