From patchwork Thu Nov 21 15:40:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 3219501 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 A0325C045B for ; Thu, 21 Nov 2013 15:44:24 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 03E5120760 for ; Thu, 21 Nov 2013 15:44:20 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id B5A5B20374 for ; Thu, 21 Nov 2013 15:44:18 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjWOk-0005vQ-AI; Thu, 21 Nov 2013 15:42:31 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjWOC-0006VM-Mh; Thu, 21 Nov 2013 15:41:56 +0000 Received: from mail-pa0-x233.google.com ([2607:f8b0:400e:c03::233]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1VjWNV-0006QN-HC for linux-arm-kernel@lists.infradead.org; Thu, 21 Nov 2013 15:41:15 +0000 Received: by mail-pa0-f51.google.com with SMTP id fa1so2843357pad.38 for ; Thu, 21 Nov 2013 07:40:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=chzePN+YFAg9LRuKrMvOQy9udJxOIcKHj6wIL9kYTwo=; b=o1Ie2k3z5CU94rHkbVhSuqFuOu91Geo4glv4AXU2HrYv12zaFnhEF+JFfp3DQnjTlj GB89//YX9DK5YsLcT543xJ1ZxOs0Ro11aU8OTkzvgW5P6X5gZgEw9X9VIh4O6p7RaWcL qBQycscMivFHm3siRG8HzHtSeC1TQ+ZBUPHvpwch14KBD6RRYB6QI1YhF/ut9bps8f1s Ztvf54nqvh+sglezjUTbaTSH0wtNxhxdHadGiixNZjuxuM0W2Igosyia/M2HuNARDUNH 0jUKCWVQ6B9DXmlGsGGu3/RAJ6ydmpK+0CvwI4+e235gSUtjF4Q0IxKqkwPH+i5Gb4U/ HePQ== X-Received: by 10.66.149.231 with SMTP id ud7mr7155114pab.8.1385048452936; Thu, 21 Nov 2013 07:40:52 -0800 (PST) Received: from fangorn.rup.mentorg.com (nat-min.mentorg.com. [139.181.32.34]) by mx.google.com with ESMTPSA id g6sm44422162pat.2.2013.11.21.07.40.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 21 Nov 2013 07:40:52 -0800 (PST) From: Dmitry Eremin-Solenikov To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 6/6] arm: sa1100: h3xxx: drop hand-coded gpio_request_array analogue Date: Thu, 21 Nov 2013 19:40:14 +0400 Message-Id: <1385048414-9812-7-git-send-email-dbaryshkov@gmail.com> X-Mailer: git-send-email 1.8.4.2 In-Reply-To: <1385048414-9812-1-git-send-email-dbaryshkov@gmail.com> References: <1385048414-9812-1-git-send-email-dbaryshkov@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20131121_104113_822605_C58F6067 X-CRM114-Status: GOOD ( 12.07 ) X-Spam-Score: -2.0 (--) Cc: Linus Walleij , Russell King , Dmitry Artamonow X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 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.6 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, 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 h3xxx_init_gpio() behaves alsmost like gpio_request_array. Also after all GPIO refactoring it is unused. Drop it now. Signed-off-by: Dmitry Eremin-Solenikov Acked-by: Linus Walleij --- arch/arm/mach-sa1100/h3xxx.c | 31 ------------------------------- arch/arm/mach-sa1100/include/mach/h3xxx.h | 11 ----------- 2 files changed, 42 deletions(-) diff --git a/arch/arm/mach-sa1100/h3xxx.c b/arch/arm/mach-sa1100/h3xxx.c index 82e8702..c79bf46 100644 --- a/arch/arm/mach-sa1100/h3xxx.c +++ b/arch/arm/mach-sa1100/h3xxx.c @@ -28,37 +28,6 @@ #include "generic.h" -void h3xxx_init_gpio(struct gpio_default_state *s, size_t n) -{ - while (n--) { - const char *name = s->name; - int err; - - if (!name) - name = "[init]"; - err = gpio_request(s->gpio, name); - if (err) { - printk(KERN_ERR "gpio%u: unable to request: %d\n", - s->gpio, err); - continue; - } - if (s->mode >= 0) { - err = gpio_direction_output(s->gpio, s->mode); - } else { - err = gpio_direction_input(s->gpio); - } - if (err) { - printk(KERN_ERR "gpio%u: unable to set direction: %d\n", - s->gpio, err); - continue; - } - if (!s->name) - gpio_free(s->gpio); - s++; - } -} - - /* * H3xxx flash support */ diff --git a/arch/arm/mach-sa1100/include/mach/h3xxx.h b/arch/arm/mach-sa1100/include/mach/h3xxx.h index c810620..603d434 100644 --- a/arch/arm/mach-sa1100/include/mach/h3xxx.h +++ b/arch/arm/mach-sa1100/include/mach/h3xxx.h @@ -79,17 +79,6 @@ #define H3600_EGPIO_LCD_5V_ON (H3XXX_EGPIO_BASE + 14) /* enable 5V to LCD. active high. */ #define H3600_EGPIO_LVDD_ON (H3XXX_EGPIO_BASE + 15) /* enable 9V and -6.5V to LCD. */ -struct gpio_default_state { - int gpio; - int mode; - const char *name; -}; - -#define GPIO_MODE_IN -1 -#define GPIO_MODE_OUT0 0 -#define GPIO_MODE_OUT1 1 - -void h3xxx_init_gpio(struct gpio_default_state *s, size_t n); void __init h3xxx_map_io(void); void __init h3xxx_mach_init(void);