From patchwork Mon Apr 30 06:52:48 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 8301 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1D19523E42 for ; Mon, 30 Apr 2012 07:02:10 +0000 (UTC) Received: from mail-iy0-f180.google.com (mail-iy0-f180.google.com [209.85.210.180]) by fiordland.canonical.com (Postfix) with ESMTP id B0F34A181A2 for ; Mon, 30 Apr 2012 07:02:09 +0000 (UTC) Received: by iage36 with SMTP id e36so5255419iag.11 for ; Mon, 30 Apr 2012 00:02:09 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf:from:to:cc :subject:date:message-id:x-mailer:mime-version:content-type :content-transfer-encoding:x-gm-message-state; bh=8ut63t4ogY0IG5+aJJZQcx10WDF9lyeR1A8e5sErgWI=; b=iXoAKWI8l1H/QWdIv2db5OTYJtnpkaJjInbh4YWgdroqtW9RK9kZrd1EIBiVxoL6oI m47cVeQ6FPjNQojv6/Bf6Ik0AYu73ppkjk2E8dlPYewsyOlyIAy9BbwXZXaXQtpl9g+s dTNjFYfgBhrNwElxYtA1SH1bNPOZ5stsqeHNBEnxjQbtoDIi/dba7JPfH4mfj3JOSeGs X/MA10MOHLOeHI1EmXtr/UIzinM3LnhkLloC2jayDI0IAUboZJLCRZff2wc8BJme8cJP 8I9rgQCfwqz8EhkVE5jc3RIvhydN61AzIywNS8y8VL8zs6LBOSHGN9nJOW29i929KaBi sIwA== Received: by 10.50.41.196 with SMTP id h4mr6049003igl.33.1335769329035; Mon, 30 Apr 2012 00:02:09 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.137.198 with SMTP id x6csp96157ibt; Mon, 30 Apr 2012 00:02:08 -0700 (PDT) Received: by 10.68.129.99 with SMTP id nv3mr20799958pbb.161.1335769327709; Mon, 30 Apr 2012 00:02:07 -0700 (PDT) Received: from mail-pb0-f50.google.com (mail-pb0-f50.google.com [209.85.160.50]) by mx.google.com with ESMTPS id gj4si4404964pbc.36.2012.04.30.00.02.07 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Apr 2012 00:02:07 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.160.50; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.160.50 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) smtp.mail=sachin.kamat@linaro.org Received: by pbcxa12 with SMTP id xa12so3956772pbc.37 for ; Mon, 30 Apr 2012 00:02:07 -0700 (PDT) Received: by 10.68.226.198 with SMTP id ru6mr6204009pbc.122.1335769327192; Mon, 30 Apr 2012 00:02:07 -0700 (PDT) Received: from localhost.localdomain ([115.113.119.130]) by mx.google.com with ESMTPS id b10sm15164511pbr.46.2012.04.30.00.02.03 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 30 Apr 2012 00:02:06 -0700 (PDT) From: Sachin Kamat To: linux-kernel@vger.kernel.org Cc: grant.likely@secretlab.ca, linus.walleij@stericsson.com, patches@linaro.org, sachin.kamat@linaro.org Subject: [PATCH] gpio/exynos: Fix compiler warnings when non-exynos machines are selected Date: Mon, 30 Apr 2012 12:22:48 +0530 Message-Id: <1335768768-10231-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQnnDzcMwUDVmtmxRVdvpd9M/+UD3np10+Ap+O05HaEmxc99TX1UFuWXCc+tEQzOD+b5/Gvb 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 --- drivers/gpio/gpio-samsung.c | 18 ++++++++++++------ 1 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/gpio/gpio-samsung.c b/drivers/gpio/gpio-samsung.c index 19d6fc0..e991d91 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 = { }; #endif +#if defined(CONFIG_ARCH_EXYNOS4) || defined(CONFIG_ARCH_EXYNOS5) static struct samsung_gpio_cfg exynos_gpio_cfg = { .set_pull = exynos_gpio_setpull, .get_pull = exynos_gpio_getpull, .set_config = samsung_gpio_setcfg_4bit, .get_config = samsung_gpio_getcfg_4bit, }; +#endif #if defined(CONFIG_CPU_S5P6440) || defined(CONFIG_CPU_S5P6450) static struct samsung_gpio_cfg s5p64x0_gpio_cfg_rbank = { @@ -2123,8 +2125,8 @@ static struct samsung_gpio_chip s5pv210_gpios_4bit[] = { * uses the above macro and depends on the banks being listed in order here. */ -static struct samsung_gpio_chip exynos4_gpios_1[] = { #ifdef CONFIG_ARCH_EXYNOS4 +static struct samsung_gpio_chip exynos4_gpios_1[] = { { .chip = { .base = EXYNOS4_GPA0(0), @@ -2222,11 +2224,11 @@ static struct samsung_gpio_chip exynos4_gpios_1[] = { .label = "GPF3", }, }, -#endif }; +#endif -static struct samsung_gpio_chip exynos4_gpios_2[] = { #ifdef CONFIG_ARCH_EXYNOS4 +static struct samsung_gpio_chip exynos4_gpios_2[] = { { .chip = { .base = EXYNOS4_GPJ0(0), @@ -2367,11 +2369,11 @@ static struct samsung_gpio_chip exynos4_gpios_2[] = { .to_irq = samsung_gpiolib_to_irq, }, }, -#endif }; +#endif -static struct samsung_gpio_chip exynos4_gpios_3[] = { #ifdef CONFIG_ARCH_EXYNOS4 +static struct samsung_gpio_chip exynos4_gpios_3[] = { { .chip = { .base = EXYNOS4_GPZ(0), @@ -2379,8 +2381,8 @@ static struct samsung_gpio_chip exynos4_gpios_3[] = { .label = "GPZ", }, }, -#endif }; +#endif #ifdef CONFIG_ARCH_EXYNOS5 static struct samsung_gpio_chip exynos5_gpios_1[] = { @@ -2719,7 +2721,9 @@ static __init int samsung_gpiolib_init(void) { struct samsung_gpio_chip *chip; int i, nr_chips; +#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250) void __iomem *gpio_base1, *gpio_base2, *gpio_base3, *gpio_base4; +#endif int group = 0; samsung_gpiolib_set_cfg(samsung_gpio_cfgs, ARRAY_SIZE(samsung_gpio_cfgs)); @@ -2971,6 +2975,7 @@ static __init int samsung_gpiolib_init(void) return 0; +#if defined(CONFIG_CPU_EXYNOS4210) || defined(CONFIG_SOC_EXYNOS5250) err_ioremap4: iounmap(gpio_base3); err_ioremap3: @@ -2979,6 +2984,7 @@ err_ioremap2: iounmap(gpio_base1); err_ioremap1: return -ENOMEM; +#endif } core_initcall(samsung_gpiolib_init);