9
0
Fork 0

eukrea_cpuimx27: allow compilation without LP3972 selected

Signed-off-by: Eric Bénard <eric@eukrea.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Eric Bénard 2010-05-17 16:42:55 +02:00 committed by Sascha Hauer
parent 33d0633f8e
commit 7b416988bb
1 changed files with 4 additions and 2 deletions

View File

@ -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;
}