From patchwork Sat Dec 20 12:38:36 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 5522451 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 1C189BEEA8 for ; Sat, 20 Dec 2014 12:39:33 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 41C292014A for ; Sat, 20 Dec 2014 12:39:32 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 367642013D for ; Sat, 20 Dec 2014 12:39:31 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y2JGZ-0000ly-2e; Sat, 20 Dec 2014 12:36:15 +0000 Received: from mail-wg0-f54.google.com ([74.125.82.54]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y2JGV-0000kl-68 for linux-arm-kernel@lists.infradead.org; Sat, 20 Dec 2014 12:36:12 +0000 Received: by mail-wg0-f54.google.com with SMTP id l2so3375501wgh.27 for ; Sat, 20 Dec 2014 04:35:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=m0IS5TYF2JSr4WDp0VtCK5mFusq9Mydu8m0XK5UYpw4=; b=HVnYZP2g8L5s3R/F8PgTF4iayooaUjgG0T55nwLvtD4xI07Xao6f0HQTgW8wLBB2+T xEOZY/3zrqr7UM8YgFcmb6Lm+AY2vdng8Aj7Ne1kvBGSf1odsRU8fC7Av40+rfhEDyFY hJ2qM0MQv8ab2WceZYR6tv/Lz/WKD1MNyIDP7rlU+YpAGypb3OUNHYcGeLwvJ7Fk1N7a 1hNW8Qsx7AmeoN7rMniBhTWRjMx0NmwpGk06PU5Ti4UxHf6jdU//XSDipNk8rdLyhCdb 6tfIXyUBpyPzEe873yP0sm5DtEKEISvb9k8s+f37QKUvnz/Wp5vpMcfKmKI562xGV2WW vtJg== X-Gm-Message-State: ALoCoQm8Zj4QmBDHtMTDky8HF5Bdwiw5AgFT/pb/dVJca2ghLnCoLB89e/9d4C2XAeeM/sdpH2PM X-Received: by 10.194.59.234 with SMTP id c10mr24000607wjr.49.1419078948482; Sat, 20 Dec 2014 04:35:48 -0800 (PST) Received: from localhost.localdomain (h-246-111.a218.priv.bahnhof.se. [85.24.246.111]) by mx.google.com with ESMTPSA id n8sm16241330wjx.0.2014.12.20.04.35.47 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 20 Dec 2014 04:35:47 -0800 (PST) From: Rickard Strandqvist To: Ben Dooks , Kukjin Kim Subject: [PATCH] arch: arm: plat-samsung: setup-camif.c: Remove some unused functions Date: Sat, 20 Dec 2014 13:38:36 +0100 Message-Id: <1419079116-31868-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20141220_043611_402890_D99F465B X-CRM114-Status: GOOD ( 13.25 ) X-Spam-Score: -0.7 (/) Cc: linux-samsung-soc@vger.kernel.org, Russell King , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Rickard Strandqvist X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Removes some functions that are not used anywhere: s3c_camif_gpio_put() s3c_camif_gpio_get() This was partially found by using a static code analysis program called cppcheck. Signed-off-by: Rickard Strandqvist --- arch/arm/plat-samsung/setup-camif.c | 41 ----------------------------------- include/media/s3c_camif.h | 4 ---- 2 files changed, 45 deletions(-) diff --git a/arch/arm/plat-samsung/setup-camif.c b/arch/arm/plat-samsung/setup-camif.c index 72d8edb..3a56ee3 100644 --- a/arch/arm/plat-samsung/setup-camif.c +++ b/arch/arm/plat-samsung/setup-camif.c @@ -28,44 +28,3 @@ static void camif_get_gpios(int *gpio_start, int *gpio_reset) *gpio_reset = S3C64XX_GPF(3); #endif } - -int s3c_camif_gpio_get(void) -{ - int gpio_start, gpio_reset; - int ret, i; - - camif_get_gpios(&gpio_start, &gpio_reset); - - for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { - int gpio = gpio_start + i; - - if (gpio == gpio_reset) - continue; - - ret = gpio_request(gpio, "camif"); - if (!ret) - ret = s3c_gpio_cfgpin(gpio, S3C_GPIO_SFN(2)); - if (ret) { - pr_err("failed to configure GPIO %d\n", gpio); - for (--i; i >= 0; i--) - gpio_free(gpio--); - return ret; - } - s3c_gpio_setpull(gpio, S3C_GPIO_PULL_NONE); - } - - return 0; -} - -void s3c_camif_gpio_put(void) -{ - int i, gpio_start, gpio_reset; - - camif_get_gpios(&gpio_start, &gpio_reset); - - for (i = 0; i < S3C_CAMIF_NUM_GPIOS; i++) { - int gpio = gpio_start + i; - if (gpio != gpio_reset) - gpio_free(gpio); - } -} diff --git a/include/media/s3c_camif.h b/include/media/s3c_camif.h index df96c2c..aa2f851 100644 --- a/include/media/s3c_camif.h +++ b/include/media/s3c_camif.h @@ -38,8 +38,4 @@ struct s3c_camif_plat_data { int (*gpio_put)(void); }; -/* Platform default helper functions */ -int s3c_camif_gpio_get(void); -int s3c_camif_gpio_put(void); - #endif /* MEDIA_S3C_CAMIF_ */