Skip to content

Commit e3b27e2

Browse files
prabhakarladgregkh
authored andcommitted
serial: pmac_zilog: Use platform_get_irq() to get the interrupt
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent fc67c91 commit e3b27e2

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

drivers/tty/serial/pmac_zilog.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1702,17 +1702,21 @@ extern struct platform_device scc_a_pdev, scc_b_pdev;
17021702

17031703
static int __init pmz_init_port(struct uart_pmac_port *uap)
17041704
{
1705-
struct resource *r_ports, *r_irq;
1705+
struct resource *r_ports;
1706+
int irq;
17061707

17071708
r_ports = platform_get_resource(uap->pdev, IORESOURCE_MEM, 0);
1708-
r_irq = platform_get_resource(uap->pdev, IORESOURCE_IRQ, 0);
1709-
if (!r_ports || !r_irq)
1709+
if (!r_ports)
17101710
return -ENODEV;
17111711

1712+
irq = platform_get_irq(uap->pdev, 0);
1713+
if (irq < 0)
1714+
return irq;
1715+
17121716
uap->port.mapbase = r_ports->start;
17131717
uap->port.membase = (unsigned char __iomem *) r_ports->start;
17141718
uap->port.iotype = UPIO_MEM;
1715-
uap->port.irq = r_irq->start;
1719+
uap->port.irq = irq;
17161720
uap->port.uartclk = ZS_CLOCK;
17171721
uap->port.fifosize = 1;
17181722
uap->port.ops = &pmz_pops;

0 commit comments

Comments
 (0)