gpio/exynos: Fix compiler warnings when non-exynos machines are selected

Fixes the following compiler warnings:

drivers/gpio/gpio-samsung.c: In function ‘samsung_gpiolib_init’:
drivers/gpio/gpio-samsung.c:2980:1: warning: label ‘err_ioremap1’ defined but not used [-Wunused-label]
drivers/gpio/gpio-samsung.c:2978:1: warning: label ‘err_ioremap2’ defined but not used [-Wunused-label]
drivers/gpio/gpio-samsung.c:2976:1: warning: label ‘err_ioremap3’ defined but not used [-Wunused-label]
drivers/gpio/gpio-samsung.c:2974:1: warning: label ‘err_ioremap4’ defined but not used [-Wunused-label]
drivers/gpio/gpio-samsung.c:2722:55: warning: unused variable ‘gpio_base4’ [-Wunused-variable]

drivers/gpio/gpio-samsung.c:455:32: warning: ‘exynos_gpio_cfg’ defined but not used [-Wunused-variable]
drivers/gpio/gpio-samsung.c:2126:33: warning: ‘exynos4_gpios_1’ defined but not used [-Wunused-variable]
drivers/gpio/gpio-samsung.c:2228:33: warning: ‘exynos4_gpios_2’ defined but not used [-Wunused-variable]
drivers/gpio/gpio-samsung.c:2373:33: warning: ‘exynos4_gpios_3’ defined but not used [-Wunused-variable]

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>

authored by Sachin Kamat and committed by Grant Likely 2760f7ad df9541a6

Changed files
+12 -6
drivers
+12 -6
drivers/gpio/gpio-samsung.c
··· 452 452 }; 453 453 #endif 454 454 455 + #if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5) 455 456 static struct samsung_gpio_cfg exynos_gpio_cfg = { 456 457 .set_pull = exynos_gpio_setpull, 457 458 .get_pull = exynos_gpio_getpull, 458 459 .set_config = samsung_gpio_setcfg_4bit, 459 460 .get_config = samsung_gpio_getcfg_4bit, 460 461 }; 462 + #endif 461 463 462 464 #if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450) 463 465 static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = { ··· 2125 2123 * uses the above macro and depends on the banks being listed in order here. 2126 2124 */ 2127 2125 2128 - static struct samsung_gpio_chip exynos4_gpios_1[] = { 2129 2126 #ifdef CONFIG_ARCH_EXYNOS4 2127 + static struct samsung_gpio_chip exynos4_gpios_1[] = { 2130 2128 { 2131 2129 .chip = { 2132 2130 .base = EXYNOS4_GPA0(0), ··· 2224 2222 .label = "GPF3", 2225 2223 }, 2226 2224 }, 2227 - #endif 2228 2225 }; 2226 + #endif 2229 2227 2230 - static struct samsung_gpio_chip exynos4_gpios_2[] = { 2231 2228 #ifdef CONFIG_ARCH_EXYNOS4 2229 + static struct samsung_gpio_chip exynos4_gpios_2[] = { 2232 2230 { 2233 2231 .chip = { 2234 2232 .base = EXYNOS4_GPJ0(0), ··· 2369 2367 .to_irq = samsung_gpiolib_to_irq, 2370 2368 }, 2371 2369 }, 2372 - #endif 2373 2370 }; 2371 + #endif 2374 2372 2375 - static struct samsung_gpio_chip exynos4_gpios_3[] = { 2376 2373 #ifdef CONFIG_ARCH_EXYNOS4 2374 + static struct samsung_gpio_chip exynos4_gpios_3[] = { 2377 2375 { 2378 2376 .chip = { 2379 2377 .base = EXYNOS4_GPZ(0), ··· 2381 2379 .label = "GPZ", 2382 2380 }, 2383 2381 }, 2384 - #endif 2385 2382 }; 2383 + #endif 2386 2384 2387 2385 #ifdef CONFIG_ARCH_EXYNOS5 2388 2386 static struct samsung_gpio_chip exynos5_gpios_1[] = { ··· 2721 2719 { 2722 2720 struct samsung_gpio_chip *chip; 2723 2721 int i, nr_chips; 2722 + #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250) 2724 2723 void __iomem *gpio_base1, *gpio_base2, *gpio_base3, *gpio_base4; 2724 + #endif 2725 2725 int group = 0; 2726 2726 2727 2727 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs)); ··· 2975 2971 2976 2972 return 0; 2977 2973 2974 + #if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250) 2978 2975 err_ioremap4: 2979 2976 iounmap(gpio_base3); 2980 2977 err_ioremap3: ··· 2984 2979 iounmap(gpio_base1); 2985 2980 err_ioremap1: 2986 2981 return -ENOMEM; 2982 + #endif 2987 2983 } 2988 2984 core_initcall(samsung_gpiolib_init); 2989 2985