aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-samsung.c
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-04-30 02:52:48 -0400
committerGrant Likely <grant.likely@secretlab.ca>2012-05-11 20:25:53 -0400
commit2760f7adbb6c4e39bd3ae733f56d4ac8fb5e3521 (patch)
treea89cafaa95eb0909babf3a3fe7506fe91f9b83c8 /drivers/gpio/gpio-samsung.c
parentdf9541a60af0985c3a756dc5f99b9253d2565a07 (diff)
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>
Diffstat (limited to 'drivers/gpio/gpio-samsung.c')
-rw-r--r--drivers/gpio/gpio-samsung.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c
index 19d6fc0229c3..e991d9171961 100644
--- a/drivers/gpio/gpio-samsung.c
+++ b/drivers/gpio/gpio-samsung.c
@@ -452,12 +452,14 @@ static struct samsung_gpio_cfg s3c24xx_gpiocfg_banka = {
452}; 452};
453#endif 453#endif
454 454
455#if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5)
455static struct samsung_gpio_cfg exynos_gpio_cfg = { 456static struct samsung_gpio_cfg exynos_gpio_cfg = {
456 .set_pull = exynos_gpio_setpull, 457 .set_pull = exynos_gpio_setpull,
457 .get_pull = exynos_gpio_getpull, 458 .get_pull = exynos_gpio_getpull,
458 .set_config = samsung_gpio_setcfg_4bit, 459 .set_config = samsung_gpio_setcfg_4bit,
459 .get_config = samsung_gpio_getcfg_4bit, 460 .get_config = samsung_gpio_getcfg_4bit,
460}; 461};
462#endif
461 463
462#if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450) 464#if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450)
463static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = { 465static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = {
@@ -2123,8 +2125,8 @@ static struct samsung_gpio_chip s5pv210_gpios_4bit[] = {
2123 * uses the above macro and depends on the banks being listed in order here. 2125 * uses the above macro and depends on the banks being listed in order here.
2124 */ 2126 */
2125 2127
2126static struct samsung_gpio_chip exynos4_gpios_1[] = {
2127#ifdef CONFIG_ARCH_EXYNOS4 2128#ifdef CONFIG_ARCH_EXYNOS4
2129static struct samsung_gpio_chip exynos4_gpios_1[] = {
2128 { 2130 {
2129 .chip = { 2131 .chip = {
2130 .base = EXYNOS4_GPA0(0), 2132 .base = EXYNOS4_GPA0(0),
@@ -2222,11 +2224,11 @@ static struct samsung_gpio_chip exynos4_gpios_1[] = {
2222 .label = "GPF3", 2224 .label = "GPF3",
2223 }, 2225 },
2224 }, 2226 },
2225#endif
2226}; 2227};
2228#endif
2227 2229
2228static struct samsung_gpio_chip exynos4_gpios_2[] = {
2229#ifdef CONFIG_ARCH_EXYNOS4 2230#ifdef CONFIG_ARCH_EXYNOS4
2231static struct samsung_gpio_chip exynos4_gpios_2[] = {
2230 { 2232 {
2231 .chip = { 2233 .chip = {
2232 .base = EXYNOS4_GPJ0(0), 2234 .base = EXYNOS4_GPJ0(0),
@@ -2367,11 +2369,11 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = {
2367 .to_irq = samsung_gpiolib_to_irq, 2369 .to_irq = samsung_gpiolib_to_irq,
2368 }, 2370 },
2369 }, 2371 },
2370#endif
2371}; 2372};
2373#endif
2372 2374
2373static struct samsung_gpio_chip exynos4_gpios_3[] = {
2374#ifdef CONFIG_ARCH_EXYNOS4 2375#ifdef CONFIG_ARCH_EXYNOS4
2376static struct samsung_gpio_chip exynos4_gpios_3[] = {
2375 { 2377 {
2376 .chip = { 2378 .chip = {
2377 .base = EXYNOS4_GPZ(0), 2379 .base = EXYNOS4_GPZ(0),
@@ -2379,8 +2381,8 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = {
2379 .label = "GPZ", 2381 .label = "GPZ",
2380 }, 2382 },
2381 }, 2383 },
2382#endif
2383}; 2384};
2385#endif
2384 2386
2385#ifdef CONFIG_ARCH_EXYNOS5 2387#ifdef CONFIG_ARCH_EXYNOS5
2386static struct samsung_gpio_chip exynos5_gpios_1[] = { 2388static struct samsung_gpio_chip exynos5_gpios_1[] = {
@@ -2719,7 +2721,9 @@ static __init int samsung_gpiolib_init(void)
2719{ 2721{
2720 struct samsung_gpio_chip *chip; 2722 struct samsung_gpio_chip *chip;
2721 int i, nr_chips; 2723 int i, nr_chips;
2724#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250)
2722 void __iomem *gpio_base1, *gpio_base2, *gpio_base3, *gpio_base4; 2725 void __iomem *gpio_base1, *gpio_base2, *gpio_base3, *gpio_base4;
2726#endif
2723 int group = 0; 2727 int group = 0;
2724 2728
2725 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs)); 2729 samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs));
@@ -2971,6 +2975,7 @@ static __init int samsung_gpiolib_init(void)
2971 2975
2972 return 0; 2976 return 0;
2973 2977
2978#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250)
2974err_ioremap4: 2979err_ioremap4:
2975 iounmap(gpio_base3); 2980 iounmap(gpio_base3);
2976err_ioremap3: 2981err_ioremap3:
@@ -2979,6 +2984,7 @@ err_ioremap2:
2979 iounmap(gpio_base1); 2984 iounmap(gpio_base1);
2980err_ioremap1: 2985err_ioremap1:
2981 return -ENOMEM; 2986 return -ENOMEM;
2987#endif
2982} 2988}
2983core_initcall(samsung_gpiolib_init); 2989core_initcall(samsung_gpiolib_init);
2984 2990