[PATCH] eukrea_cpuimx27: allow compilation without LP3972 selected

Eric Bénard eric at eukrea.com
Mon May 17 10:42:55 EDT 2010


Signed-off-by: Eric Bénard <eric at eukrea.com>
---
 board/eukrea_cpuimx27/eukrea_cpuimx27.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/board/eukrea_cpuimx27/eukrea_cpuimx27.c b/board/eukrea_cpuimx27/eukrea_cpuimx27.c
index 2b6db15..ef57a96 100644
--- a/board/eukrea_cpuimx27/eukrea_cpuimx27.c
+++ b/board/eukrea_cpuimx27/eukrea_cpuimx27.c
@@ -276,18 +276,20 @@ console_initcall(eukrea_cpuimx27_console_init);
 
 static int eukrea_cpuimx27_late_init(void)
 {
+#ifdef CONFIG_DRIVER_I2C_LP3972
 	struct i2c_client *client;
 	u8 reg[1];
-
+#endif
 	console_flush();
 	register_device(&fec_dev);
 
+#ifdef CONFIG_DRIVER_I2C_LP3972
 	client = lp3972_get_client();
 	if (!client)
 		return -ENODEV;
 	reg[0] = 0xa0;
 	i2c_write_reg(client, 0x39, reg, sizeof(reg));
-
+#endif
 	return 0;
 }
 
-- 
1.6.3.3




More information about the barebox mailing list