Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp26283066rwd; Mon, 3 Jul 2023 07:43:49 -0700 (PDT) X-Google-Smtp-Source: APBJJlFjvyrPwdkv0UA0bCDwE+ctZBrZVLZ8He3/YF6XBXpL1j3txoH1+IOrDd+vMB0fmpdwAvve X-Received: by 2002:a05:6a00:1988:b0:66a:48db:8f6a with SMTP id d8-20020a056a00198800b0066a48db8f6amr13780400pfl.12.1688395429223; Mon, 03 Jul 2023 07:43:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1688395429; cv=none; d=google.com; s=arc-20160816; b=qW8qDQwvSifcAltQADNKhRr3Ui9IX5Bq//TUXF+YT2k0UdIxCKJA/PMAHih7S/LyFX UYKTCrm3RLZKSjWYBx8LfZGkmxK8NyWr/cY8yK+iSbBvT3H14OgV+lzAG5/Xx+W9p6T1 RXv8dPDME2Ohwy13XggBqhhRz+0pEAnRIrdGx010jMdZtSzWTCtAYb3T6L2B8BNDYzC3 Fz3RzQxKpYBT/DYHfEq5oodlYM8grMNWHHbpZ3NBRLCNYKW1JRaBWLBk/AeqyuaY09Vx b2xNy6BF45PtxflO7lVibFwlANywdGzSA/CUshhIWvUxRLyhLgo2NRbCrtAix3+ZiwPh uEBw== 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=azuMm318n9QcfqOw7noaqStqC/MNHjN/jE7uHgHo914=; fh=mypHXuxD8gSLe08qvqUlK15JxsKF/fcoUw3RZMSAp6o=; b=uXixM5u+bZsDg61gm5ovnbF5b4r0qwv7pWPaCq96OnyJ6opq90xicygYc/rBbEcch3 0KiFvb3si8IM8rfMBbW5Q5+wEeqPQ6vdGuI0mpF39Qe3lIiXCXoWcmQSyyZAA+uMI+RF aq1ZRktqenzoEwHsW/5Bfs7uabKwI7QPn44g7OOKX8E3qpB6UiMYsTkNlh1WNU2TF3VQ kqsYlcj/kfb+ofsxti61mQWnxJZJrT9aDE+XomzYsg0N29Un5IQovhzadeL1IFUoGZjw 7McU3YyEHekviOwQ1rzjiPmwEQI2Qvy1Trm4p95JBeHu4kQkhSEm8bXR1wNXc88K9pIe M/+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=E5FG1hNZ; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id by8-20020a056a00400800b0067a4b6093a8si14449409pfb.29.2023.07.03.07.43.36; Mon, 03 Jul 2023 07:43:49 -0700 (PDT) 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=E5FG1hNZ; 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 S231157AbjGCOXU (ORCPT + 99 others); Mon, 3 Jul 2023 10:23:20 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbjGCOXM (ORCPT ); Mon, 3 Jul 2023 10:23:12 -0400 Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 668A0E5B; Mon, 3 Jul 2023 07:23:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688394191; x=1719930191; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=tQChtNbKGESPPW51x4K39nGYYp9RM7si+0oe9MCGHJo=; b=E5FG1hNZ8kb9XJgqT6f4mVncKazYb4mk26aA62zlsnViptpCUi+gtkzM sAf5RFQjwRTMxDSX9kupfBrLvXMRIGIR3rWxgrnYebC42+qvJYiQdYkBo vWoLu1tJPQaEt4JWnNKiY2nB5wSUZ7Mi5QnFPZSgCZg+kfVZGqfiBH05n uXqDKyOggx/2u4inFf52yXr2Ms3aX1Y1O7UL39qEwslx61Ik15nWDUQ0z 2ozX4c0anFFdhhW0JkxPh4O3V8maMQ5OSs+kvRZf2HWLtfkAW7uAQ11SK Y4meI0S57cdBaIA/mxAXhNHBsNUl09KC4TxCBdgD2AQS0XKsA41tSWAvJ A==; X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="361752571" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="361752571" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Jul 2023 07:23:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10760"; a="808602022" X-IronPort-AV: E=Sophos;i="6.01,178,1684825200"; d="scan'208";a="808602022" Received: from black.fi.intel.com ([10.237.72.28]) by FMSMGA003.fm.intel.com with ESMTP; 03 Jul 2023 07:23:06 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id BFBB613C; Mon, 3 Jul 2023 17:23:09 +0300 (EEST) From: Andy Shevchenko To: Andy Shevchenko , Dmitry Torokhov , Bartosz Golaszewski , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Mika Westerberg , Linus Walleij , Bartosz Golaszewski , Benjamin Tissoires Subject: [PATCH v2 1/3] gpiolib: of: Don't use GPIO chip fwnode in of_gpiochip_*() Date: Mon, 3 Jul 2023 17:23:06 +0300 Message-Id: <20230703142308.5772-2-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.40.0.1.gaa8946217a0b In-Reply-To: <20230703142308.5772-1-andriy.shevchenko@linux.intel.com> References: <20230703142308.5772-1-andriy.shevchenko@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE 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: X-Mailing-List: linux-kernel@vger.kernel.org GPIO library should rely only on the GPIO device's fwnode. Hence, replace GPIO chip fwnode usage by respective OF node of the GPIO device. JFYI, this is partial revert of 8afe82550240 ("gpiolib: of: Prepare of_gpiochip_add() / of_gpiochip_remove() for fwnode"). Signed-off-by: Andy Shevchenko Tested-by: Benjamin Tissoires --- drivers/gpio/gpiolib-of.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpio/gpiolib-of.c b/drivers/gpio/gpiolib-of.c index 1436cdb5fa26..5fde5a3f5118 100644 --- a/drivers/gpio/gpiolib-of.c +++ b/drivers/gpio/gpiolib-of.c @@ -1078,16 +1078,16 @@ int of_gpiochip_add(struct gpio_chip *chip) if (ret) return ret; - fwnode_handle_get(chip->fwnode); + of_node_get(np); ret = of_gpiochip_scan_gpios(chip); if (ret) - fwnode_handle_put(chip->fwnode); + of_node_put(np); return ret; } void of_gpiochip_remove(struct gpio_chip *chip) { - fwnode_handle_put(chip->fwnode); + of_node_put(dev_of_node(&chip->gpiodev->dev)); } -- 2.40.0.1.gaa8946217a0b