Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2239206pxm; Fri, 4 Mar 2022 12:05:58 -0800 (PST) X-Google-Smtp-Source: ABdhPJx+f5UyeNrpiD7w8ieHvk2dyQUUa/o0YKMxbj+b9TS00qIJa1Uw9zPgz953tEGu3pVLE8ZF X-Received: by 2002:a17:903:2c7:b0:14f:fc47:5a2f with SMTP id s7-20020a17090302c700b0014ffc475a2fmr120989plk.112.1646424358506; Fri, 04 Mar 2022 12:05:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646424358; cv=none; d=google.com; s=arc-20160816; b=OleB3Hb7Sz7cnXKyq2u0qj4r0/E2HGs8EEfs13WSe23MuUwbAy/UI0J9cKSjKyoe2u s0FFDgA83btH9V1q5SPqcKXh1wLRg2UsqHOBeKC381qTbCOLSWOkGR/Neo1kH/99pLpj DXWoY1/R62rNWkRnng0cgAkjcpX00PT6kqqclmnRxGw7PYQwa+WtZW7k9oncvDlB6Ojg zkmqJPCk+lLOTAjrZWOnRMRbuy+0c5pjSPOe+qKY5a0nY6MSU7+959EYa4xl7QJgJ9RY BuC8dlSlZEYpFNPPsoNEFEl9bubq+/a1BAe04vsvWhPkh/bDCXya/wRvLBG+ivRZBWe2 Zniw== 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=/iOtQBVz15KxRFqkMiLhxWoJ3k53jnM7ApBIrvw1JvU=; b=02BFt/mHnthbkXK3pMtwaXuaJadhXUDchBalf5s5pqYJhj7BNAD/oyaGM9DmhX2UZ5 474eSdjv4lXAS5CHcCccAUFfZiZqwRGPIsa3o7Tb/MYjLQQww8RI3NTPn1JQgO4NWurH XCkHohYnvollqgxg0AaJphfheT9S4pDQoHi+X1dfUvHCgJ8ws7Pr6PwsuE3XgFWjQPdz aMB+mOHXuZmIGUvkS/6RIKI4NHGJU1Hm5awkyzT9y3hP9W1Sr3QSTlgXCZaNERfXPY8M KK9TZ2N1CgiDqEHhKlJ5GwmnzKS9AmxDTq4yJJd0k7/a8ESLowGf03cLyIukqQqeWgQR K7wA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=wFP8mdvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id 128-20020a630886000000b003652e4b3ef2si5383020pgi.265.2022.03.04.12.05.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Mar 2022 12:05:58 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=fail header.i=@microchip.com header.s=mchp header.b=wFP8mdvZ; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 4EB5C20D514; Fri, 4 Mar 2022 11:26:18 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239889AbiCDOnV (ORCPT + 99 others); Fri, 4 Mar 2022 09:43:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43828 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239904AbiCDOnN (ORCPT ); Fri, 4 Mar 2022 09:43:13 -0500 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.154.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9D5FDC5F; Fri, 4 Mar 2022 06:42:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1646404945; x=1677940945; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uSXhUa1TK6x4EhT0rMumawhzMV00/FO2bC40apPpfOA=; b=wFP8mdvZ06O7CBG8KEV4xi074HlugzhU0LYSDnKdPA7M9xryVT46lPiq Pi+22oGzLW9ZFabDTbxIU6QQ63q8ExyQtsaT31bb+0MYdPVb5Tg7hjgdl 9Xv9y3XsPg9moOjl6Xhq5utsUIUk96BjAzbIxhhX6WCDlgwADV0JY07zb lwjheRGcQOieQOGJSnfNuQertZDZPVBKw3A28plufeNaaSy8xFP4dgq1I V6RWYCdNEZpmNh2/zotmtgI5YT4u//IjZMItMo6TfddIuTmGzO7q20urc cxhycDBxyyvY1aa1uiuayt5kAheQsuOW3Cut7goqbXRugA8W/YEa5iN+t g==; X-IronPort-AV: E=Sophos;i="5.90,155,1643698800"; d="scan'208";a="150870208" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 04 Mar 2022 07:42:25 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.85.144) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.17; Fri, 4 Mar 2022 07:42:25 -0700 Received: from soft-dev3-1.microsemi.net (10.10.115.15) by chn-vm-ex02.mchp-main.com (10.10.85.144) with Microsoft SMTP Server id 15.1.2375.17 via Frontend Transport; Fri, 4 Mar 2022 07:42:23 -0700 From: Horatiu Vultur To: , CC: , , , Horatiu Vultur Subject: [PATCH v2 2/2] pinctrl: ocelot: Fix interrupt parsing Date: Fri, 4 Mar 2022 15:44:32 +0100 Message-ID: <20220304144432.3397621-3-horatiu.vultur@microchip.com> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20220304144432.3397621-1-horatiu.vultur@microchip.com> References: <20220304144432.3397621-1-horatiu.vultur@microchip.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 In the blamed commit, it removes the duplicate of_node assignment in the driver. But the driver uses this before calling into of_gpio_dev_init to determine if it needs to assign an IRQ chip to the GPIO. The fixes consists in using the platform_get_irq_optional Fixes: 8a8d6bbe1d3bc7 ("pinctrl: Get rid of duplicate of_node assignment in the drivers") Signed-off-by: Horatiu Vultur --- drivers/pinctrl/pinctrl-ocelot.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-ocelot.c b/drivers/pinctrl/pinctrl-ocelot.c index a859fbcb09af..e8501dac2f04 100644 --- a/drivers/pinctrl/pinctrl-ocelot.c +++ b/drivers/pinctrl/pinctrl-ocelot.c @@ -1851,8 +1851,8 @@ static int ocelot_gpiochip_register(struct platform_device *pdev, gc->base = -1; gc->label = "ocelot-gpio"; - irq = irq_of_parse_and_map(gc->of_node, 0); - if (irq) { + irq = platform_get_irq_optional(pdev, 0); + if (irq > 0) { girq = &gc->irq; girq->chip = &ocelot_irqchip; girq->parent_handler = ocelot_irq_handler; -- 2.33.0