Skip to contentSkip to conversation

sh: ecovec build fix for CONFIG_I2C=n

PATCH New Magnus Damm 1 participant 1 message Feb 25, 2010 SuperH

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 sh: ecovec build fix for CONFIG_I2C=n

From: Magnus Damm <[email protected]>

Allow building the ecovec board support code
even though I2C support is disabled.

---

 arch/sh/boards/mach-ecovec24/setup.c |    7 +++++++
 1 file changed, 7 insertions(+)
arch/sh/boards/mach-ecovec24/setup.c +7 -0
@@ -773,6 +773,7 @@ static struct platform_device *ecovec_de
 	&fsi_device,
 };
 
+#ifdef CONFIG_I2C
 #define EEPROM_ADDR 0x50
 static u8 mac_read(struct i2c_adapter *a, u8 command)
 {
@@ -815,6 +816,12 @@ static void __init sh_eth_init(struct sh
 		msleep(10);
 	}
 }
+#else
+static void __init sh_eth_init(struct sh_eth_plat_data *pd)
+{
+		pr_err("unable to read sh_eth MAC address\n");
+}
+#endif
 
 #define PORT_HIZA 0xA4050158
 #define IODRIVEA  0xA405018A