[PATCH 11/16] iim: don't try to set ethaddr when NET is not selected

Eric Bénard eric at eukrea.com
Thu May 17 11:46:13 EDT 2012


an otther way to solve this would be to put the #ifdef CONFIG_NET
around xxx__iim_register_fec_ethaddr in the board support but that's
less generic.

Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 arch/arm/mach-imx/include/mach/iim.h |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-imx/include/mach/iim.h b/arch/arm/mach-imx/include/mach/iim.h
index b97c742..61d68e3 100644
--- a/arch/arm/mach-imx/include/mach/iim.h
+++ b/arch/arm/mach-imx/include/mach/iim.h
@@ -66,7 +66,9 @@ static inline int imx51_iim_register_fec_ethaddr(void)
 	if (ret != 6)
 		return -EINVAL;
 
+#ifdef CONFIG_NET
 	eth_register_ethaddr(0, buf);
+#endif
 
 	return 0;
 }
@@ -85,7 +87,9 @@ static inline int imx25_iim_register_fec_ethaddr(void)
 	if (ret != 6)
 		return -EINVAL;
 
+#ifdef CONFIG_NET
 	eth_register_ethaddr(0, buf);
+#endif
 
 	return 0;
 }
-- 
1.7.7.6




More information about the barebox mailing list