Message ID | 20230207142952.51844-11-andriy.shevchenko@linux.intel.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:2388:b0:96:219d:e725 with SMTP id i8csp4044372dyf; Tue, 7 Feb 2023 06:33:08 -0800 (PST) X-Google-Smtp-Source: AK7set8tEEiJT6g4bAsQZbqwzMjiqqSNu8izGxYa+6G5Hx7t2cf2vsDsroWQEBjOGIEIoYH3MCOF X-Received: by 2002:a17:902:dcd4:b0:194:bcca:5e71 with SMTP id t20-20020a170902dcd400b00194bcca5e71mr2438299pll.68.1675780387893; Tue, 07 Feb 2023 06:33:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675780387; cv=none; d=google.com; s=arc-20160816; b=QG4wtBGMeA54+PzpEnr+m1IKUcDTmr2ryb5noV+YkxpdvdLDup+sRlwYPZ/RGPQUvF JC3nlfwt/jQyi80anR7dWFQ44MW9uFquo9ORhsHlCT6q8TV5z7dAshUPq3NyP0qYp/0/ 3pIAxLp8YcE7DidTKsgsm9ps4unfRoBEd/7lmvaXM/kqewsvNKEbx3znAJmdR8WYIZkK q6XIbohAY+TT+J1MfbyhfPx+AvE9xlzXnHPUoxhD2FS6APw9hPRSpBhrFIStLDLAgG0M mOFNDoTpSMb8W8Cj2GBPgNBycDB5rdUv1G9o0nE+yfn1F1KwyadQZaBzl2fDrWkMa9z+ hS5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C+yFKahrRaEBhfQjGd+qHXOCF7QY5zDa+SjUInfEWHc=; b=JO8VSOqG0XeMJfd19onrAClk5ModwJLVrke87VT3+9eF2M9mZyj07Pw9/ozJZLm04v 2jRayCAEGp6bjRSVc98sK4DuKEm5KN35DD0EokCOkadKFll988Oka7PwyY7oXUkZSbyV ODnXwg4u0LQoJBZ7k4+Tsf4sAIG7/MoAPGUmARAYAzB3VQX6qB+ULI84rnzmO7la+CM+ Sv995bquYk1a4QgeJSvLna+zecMAVmKcCmlnR6GydF6hJPlfEsQ4chQbvnGimcutiHXf t7fLft1RNekRy8rBGtLpaMp6hZhpGaRBmZwSY6GVVLgUd+nmTIWgdphXUN4jRvEOI5HQ sltA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TFgRsRr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id q18-20020a170902bd9200b001945066fc29si5364782pls.325.2023.02.07.06.32.48; Tue, 07 Feb 2023 06:33:07 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=TFgRsRr1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232968AbjBGOcJ (ORCPT <rfc822;kmanaouilinux@gmail.com> + 99 others); Tue, 7 Feb 2023 09:32:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44572 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231873AbjBGOaZ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 7 Feb 2023 09:30:25 -0500 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BF75AC15E; Tue, 7 Feb 2023 06:29:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675780186; x=1707316186; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=YtyTSKv3igoWzjKzirfnsuSbOV1zJhPUEQxw+fpoykQ=; b=TFgRsRr10U8TXr9ffVVYZM++NnPy7p17RPIIjSabCMYEJtgQP/18N05f BeA9A7hex6zka82AWUQCk9UmMvwu9fpG9u+GJXhaJhEPqJVYflutAboli xSnhbuvhkxG2HXb+9VwtZlliSsjeGiYZbnhAO3K7rOTi+iVblr3OgZwHn Lka4EvHLdOlRR/iiEH0XqqOWHOuxtLP19R489UEoX1WnHhueZ2407chGa LXXmNLqWyzpblX2/kZIv8uw+GIGvBLiNJAcINrJVFFG/uPIxVVPN+M6bY GOASve+6+HvMwfMYys02h7tYeNlA7mUOSIDJRIY8CAfYa/gGpjea1OcC0 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="313163997" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="313163997" Received: from orsmga006.jf.intel.com ([10.7.209.51]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Feb 2023 06:29:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="644465289" X-IronPort-AV: E=Sophos;i="5.97,278,1669104000"; d="scan'208";a="644465289" Received: from black.fi.intel.com ([10.237.72.28]) by orsmga006.jf.intel.com with ESMTP; 07 Feb 2023 06:29:39 -0800 Received: by black.fi.intel.com (Postfix, from userid 1003) id C00A54BE; Tue, 7 Feb 2023 16:30:02 +0200 (EET) From: Andy Shevchenko <andriy.shevchenko@linux.intel.com> To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Linus Walleij <linus.walleij@linaro.org>, Arnd Bergmann <arnd@arndb.de>, Bartosz Golaszewski <bartosz.golaszewski@linaro.org>, Tony Lindgren <tony@atomide.com>, Thomas Gleixner <tglx@linutronix.de>, Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>, Geert Uytterhoeven <geert@linux-m68k.org>, Christophe Leroy <christophe.leroy@csgroup.eu>, Michael Ellerman <mpe@ellerman.id.au>, Devarsh Thakkar <devarsht@ti.com>, Dmitry Torokhov <dmitry.torokhov@gmail.com>, Stefan Schmidt <stefan@datenfreihafen.org>, Miquel Raynal <miquel.raynal@bootlin.com>, linux-gpio@vger.kernel.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc-tw-discuss@lists.sourceforge.net, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-m68k@lists.linux-m68k.org, linuxppc-dev@lists.ozlabs.org, linux-sh@vger.kernel.org, linux-acpi@vger.kernel.org, linux-input@vger.kernel.org, linux-media@vger.kernel.org, linux-wpan@vger.kernel.org, netdev@vger.kernel.org, linux-wireless@vger.kernel.org, brcm80211-dev-list.pdl@broadcom.com, SHA-cyfmac-dev-list@infineon.com, linux-arch@vger.kernel.org, devicetree@vger.kernel.org Cc: Bartosz Golaszewski <brgl@bgdev.pl>, Jonathan Corbet <corbet@lwn.net>, Alex Shi <alexs@kernel.org>, Yanteng Si <siyanteng@loongson.cn>, Hu Haowen <src.res@email.cn>, Russell King <linux@armlinux.org.uk>, Aaro Koskinen <aaro.koskinen@iki.fi>, Janusz Krzysztofik <jmkrzyszt@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Gregory Clement <gregory.clement@bootlin.com>, Alim Akhtar <alim.akhtar@samsung.com>, Nicholas Piggin <npiggin@gmail.com>, Yoshinori Sato <ysato@users.sourceforge.jp>, Rich Felker <dalias@libc.org>, Mun Yew Tham <mun.yew.tham@intel.com>, Keerthy <j-keerthy@ti.com>, Mika Westerberg <mika.westerberg@linux.intel.com>, Mauro Carvalho Chehab <mchehab@kernel.org>, Alexander Aring <alex.aring@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, Arend van Spriel <aspriel@gmail.com>, Franky Lin <franky.lin@broadcom.com>, Hante Meuleman <hante.meuleman@broadcom.com>, Kalle Valo <kvalo@kernel.org>, Qiang Zhao <qiang.zhao@nxp.com>, Li Yang <leoyang.li@nxp.com>, Lee Jones <lee@kernel.org>, Rob Herring <robh+dt@kernel.org>, Frank Rowand <frowand.list@gmail.com> Subject: [PATCH v3 10/12] gpiolib: Deduplicate forward declarations in consumer.h Date: Tue, 7 Feb 2023 16:29:50 +0200 Message-Id: <20230207142952.51844-11-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230207142952.51844-1-andriy.shevchenko@linux.intel.com> References: <20230207142952.51844-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757183096285513604?= X-GMAIL-MSGID: =?utf-8?q?1757183096285513604?= |
Series |
gpiolib cleanups
|
|
Commit Message
Andy Shevchenko
Feb. 7, 2023, 2:29 p.m. UTC
The struct fwnode_handle pointer is used in both branches of ifdeffery,
no need to have a copy of the same in each of them, just make it global.
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
include/linux/gpio/consumer.h | 7 +------
1 file changed, 1 insertion(+), 6 deletions(-)
diff --git a/include/linux/gpio/consumer.h b/include/linux/gpio/consumer.h index 59cb20cfac3d..a7eb8aa1e54c 100644 --- a/include/linux/gpio/consumer.h +++ b/include/linux/gpio/consumer.h @@ -8,6 +8,7 @@ #include <linux/err.h> struct device; +struct fwnode_handle; struct gpio_desc; struct gpio_array; @@ -171,9 +172,6 @@ int gpiod_set_consumer_name(struct gpio_desc *desc, const char *name); struct gpio_desc *gpio_to_desc(unsigned gpio); int desc_to_gpio(const struct gpio_desc *desc); -/* Child properties interface */ -struct fwnode_handle; - struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode, const char *con_id, int index, enum gpiod_flags flags, @@ -546,9 +544,6 @@ static inline int desc_to_gpio(const struct gpio_desc *desc) return -EINVAL; } -/* Child properties interface */ -struct fwnode_handle; - static inline struct gpio_desc *fwnode_gpiod_get_index(struct fwnode_handle *fwnode, const char *con_id, int index,