From patchwork Tue Feb 7 14:29:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 652569 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D3DD4C64EC7 for ; Tue, 7 Feb 2023 14:32:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233076AbjBGOcI (ORCPT ); Tue, 7 Feb 2023 09:32:08 -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 ); 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 To: Andy Shevchenko , Linus Walleij , Arnd Bergmann , Bartosz Golaszewski , Tony Lindgren , Thomas Gleixner , Krzysztof Kozlowski , Geert Uytterhoeven , Christophe Leroy , Michael Ellerman , Devarsh Thakkar , Dmitry Torokhov , Stefan Schmidt , Miquel Raynal , 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 , Jonathan Corbet , Alex Shi , Yanteng Si , Hu Haowen , Russell King , Aaro Koskinen , Janusz Krzysztofik , Andrew Lunn , Sebastian Hesselbarth , Gregory Clement , Alim Akhtar , Nicholas Piggin , Yoshinori Sato , Rich Felker , Mun Yew Tham , Keerthy , Mika Westerberg , Mauro Carvalho Chehab , Alexander Aring , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Arend van Spriel , Franky Lin , Hante Meuleman , Kalle Valo , Qiang Zhao , Li Yang , Lee Jones , Rob Herring , Frank Rowand 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 Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org 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 --- 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 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,