msm: 8960: Don't configure Ethernet if it is disabled

Only configure the GPIOs for the SPI Ethernet controller if
support for it has been compiled in. This modification will
ensure that the Ethernet PHY does not leak current back into the
external LDO 2 regulator.

Signed-off-by: Stepan Moskovchenko <stepanm@codeaurora.org>
diff --git a/arch/arm/mach-msm/board-msm8960.c b/arch/arm/mach-msm/board-msm8960.c
index e6ba7b1..1c4e78e 100644
--- a/arch/arm/mach-msm/board-msm8960.c
+++ b/arch/arm/mach-msm/board-msm8960.c
@@ -255,11 +255,13 @@
 	.pull = GPIOMUX_PULL_NONE,
 };
 
+#ifdef CONFIG_KS8851
 static struct gpiomux_setting gpio_eth_config = {
 	.pull = GPIOMUX_PULL_NONE,
 	.drv = GPIOMUX_DRV_8MA,
 	.func = GPIOMUX_FUNC_GPIO,
 };
+#endif
 
 static struct gpiomux_setting slimbus = {
 	.func = GPIOMUX_FUNC_1,
@@ -268,6 +270,7 @@
 };
 
 struct msm_gpiomux_config msm8960_gpiomux_configs[NR_GPIO_IRQS] = {
+#ifdef CONFIG_KS8851
 	{
 		.gpio = KS8851_IRQ_GPIO,
 		.settings = {
@@ -286,6 +289,7 @@
 			[GPIOMUX_SUSPENDED] = &gpio_eth_config,
 		}
 	},
+#endif
 };
 
 static struct msm_gpiomux_config msm8960_gsbi_configs[] __initdata = {
@@ -3124,6 +3128,7 @@
 		gpio_free(wcnss_5wire_interface[j].gpio);
 }
 
+#ifdef CONFIG_KS8851
 static int ethernet_init(void)
 {
 	int ret;
@@ -3155,6 +3160,12 @@
 fail:
 	return ret;
 }
+#else
+static int ethernet_init(void)
+{
+	return 0;
+}
+#endif
 
 static struct msm_cpuidle_state msm_cstates[] __initdata = {
 	{0, 0, "C0", "WFI",