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: 5522441 Return-Path: X-Original-To: patchwork-linux-samsung-soc@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 664089F30B for ; Sat, 20 Dec 2014 12:36:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8A3DE20158 for ; Sat, 20 Dec 2014 12:36:05 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9B2E62014A for ; Sat, 20 Dec 2014 12:36:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752805AbaLTMfu (ORCPT ); Sat, 20 Dec 2014 07:35:50 -0500 Received: from mail-wi0-f179.google.com ([209.85.212.179]:41081 "EHLO mail-wi0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752782AbaLTMft (ORCPT ); Sat, 20 Dec 2014 07:35:49 -0500 Received: by mail-wi0-f179.google.com with SMTP id ex7so4208256wid.0 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=lRdxTQG6almUw5eS4bAqZ9Der4gyYJsjyk+OCm+iLSUIN7JtQihOozVyQ1MkvGuz24 9csosGsKEODYQtL/U5VqLOI217vVlIuFFcN98yDvQ2lcqBvJRSMIGbHqciLVP9xGgDoA 6YLqLXqnOLF7Q9SfI8fsJoL45U2bIRQkKvP7QxCCGZ2pkwDvqia0E4lhwG5hraGE6UdX QZmmD6gYgb5/9xFKzeFqvnqaDaeiRtm14YigMn47KkGNU/uuM+kIer9yCwlDWAAHxQpG 7QGfNQjaiLcvYzVQUQDLIiUl/OT0gp6bSHGSDcw1o7MsTqLtzDAGSrI9uVxspVjLi0EN r9fA== X-Gm-Message-State: ALoCoQkxw4DltDxW+w3LGSK5sgDhTOHc0xSu8GNnr8muQEmv7aq6kV7OF+RNoLkC7NEX/lQBHKaL 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 Cc: Rickard Strandqvist , Russell King , linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org 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 Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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_ */