From patchwork Tue Sep 20 10:30:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jianqun Xu X-Patchwork-Id: 12981868 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 612C3C54EE9 for ; Tue, 20 Sep 2022 10:31:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=SbA/4KzhUyHZlMPV83OtmnB4bcsjo2fEfwxORL+fQB4=; b=ewHkoWzQYUrm+e cGN6TcFJdPQUT5Pjr6jzWTXc3daO2kRdfQAN98FU09KdVKcIi2T9t7CBawhaR3P8iCAoH+A/Sg8eE CQ+4m+cV5mGOvM8RVu6TLGBgxE1Ce/bhL73BaGegLAjBkDMeu2ScmdM9b70uOedUZppVydnhT/KNs VhdOxRdKMFFfeqUVOW+u8v1+zWWiJGD4Y8kotrj7vVDN/ciPC7NwcnJ7xB02rhDw6ml+k+sTPbZIw uIlMfMSDnwXneqv+SJQzkJHOipBWIufESqwLHyflroEz8/vHdBSs4y32u5gQi+E+hF5sdGb7N6FTj y2yqtLodyopyE0rnmqOA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaaXV-002yat-Jb; Tue, 20 Sep 2022 10:31:41 +0000 Received: from mail-m11875.qiye.163.com ([115.236.118.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oaaXH-002yLR-Tw for linux-rockchip@lists.infradead.org; Tue, 20 Sep 2022 10:31:31 +0000 Received: from localhost.localdomain (unknown [58.22.7.114]) by mail-m11875.qiye.163.com (Hmail) with ESMTPA id 5B7DA280B9C; Tue, 20 Sep 2022 18:31:14 +0800 (CST) From: Jianqun Xu To: linus.walleij@linaro.org, heiko@sntech.de, brgl@bgdev.pl, andriy.shevchenko@linux.intel.com Cc: robert.moore@intel.com, robh@kernel.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org, lenb@kernel.org, rafael@kernel.org, Jianqun Xu Subject: [PATCH 06/20] pinctrl/rockchip: parse dt only if the fwnode is of node Date: Tue, 20 Sep 2022 18:30:54 +0800 Message-Id: <20220920103108.23074-7-jay.xu@rock-chips.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220920103108.23074-1-jay.xu@rock-chips.com> References: <20220920103108.23074-1-jay.xu@rock-chips.com> MIME-Version: 1.0 X-HM-Spam-Status: e1kfGhgUHx5ZQUpXWQgPGg8OCBgUHx5ZQUlOS1dZFg8aDwILHllBWSg2Ly tZV1koWUFJSktLSjdXWS1ZQUlXWQ8JGhUIEh9ZQVlCGhhKVkhNGkhJHkgeSENDSVUTARMWGhIXJB QOD1lXWRgSC1lBWU5DVUlJVUxVSkpPWVdZFhoPEhUdFFlBWU9LSFVKSktISkNVSktLVUtZBg++ X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6OQg6OCo4Sj0YKhwtLQowLxpP LjBPCw9VSlVKTU1ITU1CQ0xOS0tLVTMWGhIXVREaAlUDDjsJFBgQVhgTEgsIVRgUFkVZV1kSC1lB WU5DVUlJVUxVSkpPWVdZCAFZQUlLSEs3Bg++ X-HM-Tid: 0a835a73afbf2eb1kusn5b7da280b9c X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220920_033128_249592_6AB9CD43 X-CRM114-Status: UNSURE ( 8.34 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org Check if the fwnode is a of node before parsing dt, otherwise return a '0' to allow driver to continue. Signed-off-by: Jianqun Xu --- drivers/pinctrl/pinctrl-rockchip.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/pinctrl/pinctrl-rockchip.c b/drivers/pinctrl/pinctrl-rockchip.c index 42aa3552417a..7b8d3bff9721 100644 --- a/drivers/pinctrl/pinctrl-rockchip.c +++ b/drivers/pinctrl/pinctrl-rockchip.c @@ -3038,6 +3038,9 @@ static int rockchip_pinctrl_parse_dt(struct platform_device *pdev, int ret; int i; + if (!is_of_node(fwnode)) + return 0; + rockchip_pinctrl_child_count(info, np); dev_dbg(dev, "nfunctions = %d\n", info->nfunctions);