From patchwork Tue Nov 6 15:16:54 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 12693 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 5FEF623F56 for ; Tue, 6 Nov 2012 15:17:08 +0000 (UTC) Received: from mail-ie0-f180.google.com (mail-ie0-f180.google.com [209.85.223.180]) by fiordland.canonical.com (Postfix) with ESMTP id 12B2FA19C22 for ; Tue, 6 Nov 2012 15:17:07 +0000 (UTC) Received: by mail-ie0-f180.google.com with SMTP id e10so689619iej.11 for ; Tue, 06 Nov 2012 07:17:07 -0800 (PST) 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 :x-gm-message-state; bh=qh/hSGRIKJN0tCyebNECAvIouADHsZqIYlvIlC3MkVI=; b=j6Wc0QfqLy67HOAit0ATo/YEVQdLwLtHpD6b/PxEUnRCDtE+c6fkgKeZX4DDBmxLaB cjSLaYpsWdDrrkAO3KHRgs8UfTmeipieXVQEFJQ1e/tVafuVxuGu5RSVVaqsLqzHp15m L16swkScePsyBgmJt+FtoSBausvo+bkvBJ2QnooleYGxPifbR8eoJwYSSYvuOkREBwFU loAY+EzvUBgpYwnC4M3zqQFOpE9oLy7wpiTL23G18DjGEwLTyQsfb4IsX2S+ifV7rnzZ VDwlICAzmkJF4kZvpXKPROqMu2fv3f55ocaRNhD5uoKasOkLIcyxkc0UB0TguawriGUe XxQA== Received: by 10.50.237.69 with SMTP id va5mr1266252igc.62.1352215027543; Tue, 06 Nov 2012 07:17:07 -0800 (PST) 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.50.67.148 with SMTP id n20csp57953igt; Tue, 6 Nov 2012 07:17:06 -0800 (PST) Received: by 10.14.179.6 with SMTP id g6mr4295428eem.46.1352215026390; Tue, 06 Nov 2012 07:17:06 -0800 (PST) Received: from eu1sys200aog115.obsmtp.com (eu1sys200aog115.obsmtp.com [207.126.144.139]) by mx.google.com with SMTP id m6si17806388eed.81.2012.11.06.07.16.58 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Nov 2012 07:17:06 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) client-ip=207.126.144.139; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.139 is neither permitted nor denied by best guess record for domain of linus.walleij@stericsson.com) smtp.mail=linus.walleij@stericsson.com Received: from beta.dmz-eu.st.com ([164.129.1.35]) (using TLSv1) by eu1sys200aob115.postini.com ([207.126.147.11]) with SMTP ID DSNKUJkp6j6czbG8DQusccKn4zIPMQrcAUIA@postini.com; Tue, 06 Nov 2012 15:17:06 UTC Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 7999F2CC; Tue, 6 Nov 2012 15:16:57 +0000 (GMT) Received: from relay1.stm.gmessaging.net (unknown [10.230.100.17]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1A845495C; Tue, 6 Nov 2012 15:16:57 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay1.stm.gmessaging.net (Postfix) with ESMTPS id 5347724C2F0; Tue, 6 Nov 2012 16:16:49 +0100 (CET) Received: from steludxu4075.lud.stericsson.com (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 6 Nov 2012 16:16:56 +0100 From: Linus Walleij To: , , Shiraz Hashim , Viresh Kumar Cc: Stephen Warren , Anmar Oueja , Grant Likely , Linus Walleij Subject: [PATCH 3/5] gpiolib: remove duplicate pin range code Date: Tue, 6 Nov 2012 16:16:54 +0100 Message-ID: <1352215014-30305-1-git-send-email-linus.walleij@stericsson.com> X-Mailer: git-send-email 1.7.11.3 MIME-Version: 1.0 X-Gm-Message-State: ALoCoQkPhd2Ng2rIgTIN9tOiim+TVyw9x9N4f4nD0zlot3C+9fzdGxpQnhulQMyIB6S8sXl3DTG/ From: Linus Walleij Commit 69e1601bca88809dc118abd1becb02c15a02ec71 "gpiolib: provide provision to register pin ranges" Introduced both of_gpiochip_remove_pin_range() and gpiochip_remove_pin_ranges(). But the contents are exactly the same so remove the OF one and rely on the range deletion in the core. Signed-off-by: Linus Walleij --- drivers/gpio/gpiolib-of.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 220caa5..67403e4 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -254,19 +254,8 @@ static void of_gpiochip_add_pin_range(struct gpio_chip *chip) } while (index++); } -static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) -{ - struct gpio_pin_range *pin_range, *tmp; - - list_for_each_entry_safe(pin_range, tmp, &chip->pin_ranges, node) { - list_del(&pin_range->node); - pinctrl_remove_gpio_range(pin_range->pctldev, - &pin_range->range); - } -} #else static void of_gpiochip_add_pin_range(struct gpio_chip *chip) {} -static void of_gpiochip_remove_pin_range(struct gpio_chip *chip) {} #endif void of_gpiochip_add(struct gpio_chip *chip) @@ -288,7 +277,7 @@ void of_gpiochip_add(struct gpio_chip *chip) void of_gpiochip_remove(struct gpio_chip *chip) { - of_gpiochip_remove_pin_range(chip); + gpiochip_remove_pin_ranges(chip); if (chip->of_node) of_node_put(chip->of_node);