Skip to content

Commit 62fdc81

Browse files
prabhakarladgregkh
authored andcommitted
serial: meson: Use platform_get_irq() to get the interrupt
[ Upstream commit 5b68061 ] 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(). Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Link: https://lore.kernel.org/r/20211224142917.6966-5-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Stable-dep-of: 2a1d728 ("tty: serial: meson: fix hard LOCKUP on crtscts mode") Signed-off-by: Sasha Levin <sashal@kernel.org>
1 parent 9eb54de commit 62fdc81

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

drivers/tty/serial/meson_uart.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -665,10 +665,11 @@ static int meson_uart_probe_clocks(struct platform_device *pdev,
665665

666666
static int meson_uart_probe(struct platform_device *pdev)
667667
{
668-
struct resource *res_mem, *res_irq;
668+
struct resource *res_mem;
669669
struct uart_port *port;
670670
u32 fifosize = 64; /* Default is 64, 128 for EE UART_0 */
671671
int ret = 0;
672+
int irq;
672673

673674
if (pdev->dev.of_node)
674675
pdev->id = of_alias_get_id(pdev->dev.of_node, "serial");
@@ -691,9 +692,9 @@ static int meson_uart_probe(struct platform_device *pdev)
691692
if (!res_mem)
692693
return -ENODEV;
693694

694-
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
695-
if (!res_irq)
696-
return -ENODEV;
695+
irq = platform_get_irq(pdev, 0);
696+
if (irq < 0)
697+
return irq;
697698

698699
of_property_read_u32(pdev->dev.of_node, "fifo-size", &fifosize);
699700

@@ -718,7 +719,7 @@ static int meson_uart_probe(struct platform_device *pdev)
718719
port->iotype = UPIO_MEM;
719720
port->mapbase = res_mem->start;
720721
port->mapsize = resource_size(res_mem);
721-
port->irq = res_irq->start;
722+
port->irq = irq;
722723
port->flags = UPF_BOOT_AUTOCONF | UPF_LOW_LATENCY;
723724
port->dev = &pdev->dev;
724725
port->line = pdev->id;

0 commit comments

Comments
 (0)