The cpu_eth_init function should be ifdef CONFIG_CMD_NET and the individual driver init functions should use the corresponding CONFIG_FOO.
Requested by Marek during upstream review. Signed-off-by: Ian Campbell <[email protected]> --- arch/arm/cpu/armv7/sunxi/board.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/arch/arm/cpu/armv7/sunxi/board.c b/arch/arm/cpu/armv7/sunxi/board.c index 88191a4..34d7872 100644 --- a/arch/arm/cpu/armv7/sunxi/board.c +++ b/arch/arm/cpu/armv7/sunxi/board.c @@ -130,7 +130,7 @@ void enable_caches(void) } #endif -#if defined(CONFIG_SUNXI_EMAC) || defined(CONFIG_SUNXI_GMAC) +#ifdef CONFIG_CMD_NET /* * Initializes on-chip ethernet controllers. * to override, implement board_eth_init() @@ -139,7 +139,8 @@ int cpu_eth_init(bd_t *bis) { #ifdef CONFIG_SUNXI_EMAC sunxi_emac_initialize(bis); -#else +#endif +#ifdef CONFIG_SUNXI_GMAC sunxi_gmac_initialize(bis); #endif -- 1.9.0 -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
