From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.139 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796290221; b=EsCTKloChulUOSKMJb2cn8ID4GxwJBYwVu5hKSNpmfNcc1gjPLqTRK4/QnwtOL2QqnPf 1RApKLk3fB4YF94jQHveaANsp9xtnVpPOzyM2oaPf7pnUP5LmDs1fvWOICSc8QqAvWtKc m+r9wfBsUtIF7MNO7ORA5NtKEZcxqQZEAEzw9cWjQFpOo8u7C9PWtbWrcIWaoJ/SmVfY7 nTyIryRKeO00dlxHKiKOKuehS0CpS1wuAUkVkrSNO68WKJ1N+jIBgpEEh8mZWq2p8IJ2Y q292lIDvwrd5YWoBdzxTK1r5la2XyoSmQpS4fr6YZRFx80tD5nfBnF3I7Kw57Tkpr+A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796290221; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:From:Date:Subject:MIME-Version: Content-Type:Content-Transfer-Encoding:Message-Id:References: In-Reply-To:To:Cc:X-Mailer; bh=7pBMP4ehiiKiyB+7NH3d7iBlNHHoXetBFtmsS0ITK3U=; b=JarnH9+EpPg8s2n0b55tCsdp/bcJuKjF9HikJzUGLvKOFv7QV+0EMSvOxlqAqL3wSLkL V8qLRmkVEl5SYZSdzLvOGTRFW3IkNr3nk4P6u/Xbx/SEgwh1rfKZfkygkEyazp812xpLH lc2vQ5Ogn+4k6L+gcbkDfEjArHSUcJmb+IELRjtWP4xj9IpB4mK0YRNW/r/bQYPwqtjPY ZbTNcPBziY9uwrtY/sntZXYvznCgeDw++sm0aswDteQJzFpZxWWYLnvcmjChk/xgTa92V CaWuHCWjNf/UYbsEPjwS8YWKXfBbv9BEO1HKtEXjGTbKMr6RPVVJXUr+Q43aDGeYKKQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fnnfnSjR; arc=none smtp.remote-ip=95.215.58.139 Received: from mta1.migadu.com (out-139.mta1.migadu.com [95.215.58.139]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F3FF606A333 for ; Thu, 3 Dec 2026 09:30:19 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3F3FF606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=fnnfnSjR X-Envelope-To: linux-kernel@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=jOggEBSxyQB6nwV4u3EGJ03CvrbVfQIhfKnCRQPwNWE=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1796290218; v=1; x=1796895018; b=fnnfnSjR/geEV5+Xs8sdVtD38rPy4Tjbxy/CvCZWR544l8jtU5D0gLa7b+uLGCgIBRLcwMGO UNQBhOhS8F54nbFtSMx4hIzFGo7f3IF8j4eFif/q5fsh5XKb+TnNv488/sMMjT30ZoZYig2Yf9L xjdfdAuhFdtLIZBBy0+BxWU0= X-Envelope-To: linux-kernel@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id 199009cb412cbcd8; Thu, 03 Dec 2026 09:30:16 +0000 X-Mizu-Trace-ID: 199009cb412cbcd8 X-Migadu-Flow: FLOW_OUT From: Peng Fan Date: Thu, 03 Dec 2026 17:29:19 +0800 Subject: [PATCH v2 7/8] irqchip/imx-intmux: Use devm_irq_domain_create_linear() X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20261203-imx-intmux-v2-7-a6db1eed3b5f@nxp.com> References: <20261203-imx-intmux-v2-0-a6db1eed3b5f@nxp.com> In-Reply-To: <20261203-imx-intmux-v2-0-a6db1eed3b5f@nxp.com> To: Thomas Gleixner , Radu Rendec , Frank Li , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Shengjiu Wang , Marc Zyngier Cc: linux-kernel@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Peng Fan X-Mailer: b4 0.14.3 From: Peng Fan Manage the per-channel IRQ domains with devres so that they are removed automatically when probe fails or the driver is unbound, instead of calling irq_domain_remove() explicitly in the probe error path and in imx_intmux_remove(). The child mappings are still disposed explicitly before the domains go away. devres runs after imx_intmux_remove() and after the probe error path returns, so each domain is removed with an empty reverse map once the IPG clock is no longer in use. The clock has no managed disable action. No functional change. Signed-off-by: Peng Fan --- drivers/irqchip/irq-imx-intmux.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/irqchip/irq-imx-intmux.c b/drivers/irqchip/irq-imx-intmux.c index 369132b4677b..eeba45f312be 100644 --- a/drivers/irqchip/irq-imx-intmux.c +++ b/drivers/irqchip/irq-imx-intmux.c @@ -260,8 +260,9 @@ static int imx_intmux_probe(struct platform_device *pdev) goto out; } - domain = irq_domain_create_linear(of_fwnode_handle(np), 32, &imx_intmux_domain_ops, - &data->irqchip_data[i]); + domain = devm_irq_domain_create_linear(&pdev->dev, dev_fwnode(&pdev->dev), 32, + &imx_intmux_domain_ops, + &data->irqchip_data[i]); if (!domain) { ret = -ENOMEM; dev_err(&pdev->dev, "failed to create IRQ domain\n"); @@ -301,7 +302,6 @@ static int imx_intmux_probe(struct platform_device *pdev) for (unsigned int hwirq = 0; hwirq < 32; hwirq++) irq_dispose_mapping(irq_find_mapping(data->irqchip_data[i].domain, hwirq)); - irq_domain_remove(data->irqchip_data[i].domain); irq_dispose_mapping(data->irqchip_data[i].irq); } pm_runtime_disable(&pdev->dev); @@ -335,7 +335,6 @@ static void imx_intmux_remove(struct platform_device *pdev) for (unsigned int hwirq = 0; hwirq < 32; hwirq++) irq_dispose_mapping(irq_find_mapping(data->irqchip_data[i].domain, hwirq)); - irq_domain_remove(data->irqchip_data[i].domain); irq_dispose_mapping(data->irqchip_data[i].irq); } -- 2.56.0