Skip to content

Commit 49bf927

Browse files
ndreysScott Wood
authored andcommitted
powerpc/e8248e: Select PHYLIB only if NETDEVICES is enabled
Select PHYLIB only if NETDEVICES is enabled and MDIO_BITBANG only if PHYLIB is present to avoid warnings from Kconfig. To prevent undefined references during linking register MDIO driver only if CONFIG_MDIO_BITBANG is enabled. Signed-off-by: Andrey Smirnov <[email protected]> Signed-off-by: Scott Wood <[email protected]>
1 parent 93c4ea3 commit 49bf927

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

arch/powerpc/platforms/82xx/Kconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ config EP8248E
3030
select 8272
3131
select 8260
3232
select FSL_SOC
33-
select PHYLIB
34-
select MDIO_BITBANG
33+
select PHYLIB if NETDEVICES
34+
select MDIO_BITBANG if PHYLIB
3535
help
3636
This enables support for the Embedded Planet EP8248E board.
3737

arch/powerpc/platforms/82xx/ep8248e.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -298,7 +298,9 @@ static const struct of_device_id of_bus_ids[] __initconst = {
298298
static int __init declare_of_platform_devices(void)
299299
{
300300
of_platform_bus_probe(NULL, of_bus_ids, NULL);
301-
platform_driver_register(&ep8248e_mdio_driver);
301+
302+
if (IS_ENABLED(CONFIG_MDIO_BITBANG))
303+
platform_driver_register(&ep8248e_mdio_driver);
302304

303305
return 0;
304306
}

0 commit comments

Comments
 (0)