From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B57643DDDA1; Tue, 16 Jun 2026 19:06:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636800; cv=none; b=mCpUWP8pR9dOLbUlADBchkp9IDJXth3rjGsGTkoeRv0oq9+qkdy9i+CPvOvF3HGPeIqlvFGfhhPY9eNBxfbKabj9XoJQUoaVu/7jsiwmm+iys1T4jDJXgLLzfwAEKt1csgs4tNoi5X4IgUvVJNzsiqB6Hs7xwR5IjuCaTeb/WyA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1781636800; c=relaxed/simple; bh=3a9JFjTaNACnTawVgf3WqZQHXm/43a8hXFpew81Fvj4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Y2/q6AqEMWZZcaexTFkZkfIe/ih1KT5iInVXHSNDeY2BhwtgmxDLpQgxKl74BRW9iIcB6HLZumL1favHVVPHtQqh+r0u9X23aYP/issVFIqDy6CbQBdOTEr0LcFQAxMXvkZ/xGA70Ds0NX0LY3bbP4f6GQIapek0ASsj86/ujlA= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=ycYLgq84; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="ycYLgq84" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C401F1F000E9; Tue, 16 Jun 2026 19:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1781636799; bh=+ugPOoIj1nMp6rzUbL0MB1FNuxDpQeYl7JuLeUE8oH0=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=ycYLgq84XVlTr+ypEwGQ5pc4LaJWGBNH56VVnYiNerkkXkS36Z3Wqi1cMAJ4FiTor EEEovwYseeZoE9/cB+n37ParFa49w1H/jAs1bsbAVMci6gFMCMNxGNJIde8dHkThON SKXZdEeeNAWW6wHO8tYmd9e2HE4GiW93Sjoi8z9Q= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Lad Prabhakar , Sasha Levin Subject: [PATCH 5.10 307/342] serial: altera_jtaguart: Use platform_get_irq_optional() to get the interrupt Date: Tue, 16 Jun 2026 20:30:03 +0530 Message-ID: <20260616145102.752398406@linuxfoundation.org> X-Mailer: git-send-email 2.54.0 In-Reply-To: <20260616145048.348037099@linuxfoundation.org> References: <20260616145048.348037099@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 5.10-stable review patch. If anyone has any objections, please let me know. ------------------ From: Lad Prabhakar [ Upstream commit 60302276caff50f907bc3391a364691ab4a21b43 ] platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypasses the hierarchical setup and messes up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq_optional(). Signed-off-by: Lad Prabhakar Link: https://lore.kernel.org/r/20211224142917.6966-7-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman Stable-dep-of: ea66be25f0e9 ("serial: altera_jtaguart: handle uart_add_one_port() failures") Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/altera_jtaguart.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) --- a/drivers/tty/serial/altera_jtaguart.c +++ b/drivers/tty/serial/altera_jtaguart.c @@ -420,8 +420,9 @@ static int altera_jtaguart_probe(struct struct altera_jtaguart_platform_uart *platp = dev_get_platdata(&pdev->dev); struct uart_port *port; - struct resource *res_irq, *res_mem; + struct resource *res_mem; int i = pdev->id; + int irq; /* -1 emphasizes that the platform must have one port, no .N suffix */ if (i == -1) @@ -440,9 +441,11 @@ static int altera_jtaguart_probe(struct else return -ENODEV; - res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (res_irq) - port->irq = res_irq->start; + irq = platform_get_irq_optional(pdev, 0); + if (irq < 0 && irq != -ENXIO) + return irq; + if (irq > 0) + port->irq = irq; else if (platp) port->irq = platp->irq; else