Skip to content

Commit fc67c91

Browse files
prabhakarladgregkh
authored andcommitted
serial: bcm63xx: 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(). Acked-by: Florian Fainelli <[email protected]> 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 1129a63 commit fc67c91

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

drivers/tty/serial/bcm63xx_uart.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -804,7 +804,7 @@ static struct uart_driver bcm_uart_driver = {
804804
*/
805805
static int bcm_uart_probe(struct platform_device *pdev)
806806
{
807-
struct resource *res_mem, *res_irq;
807+
struct resource *res_mem;
808808
struct uart_port *port;
809809
struct clk *clk;
810810
int ret;
@@ -833,9 +833,10 @@ static int bcm_uart_probe(struct platform_device *pdev)
833833
if (IS_ERR(port->membase))
834834
return PTR_ERR(port->membase);
835835

836-
res_irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
837-
if (!res_irq)
838-
return -ENODEV;
836+
ret = platform_get_irq(pdev, 0);
837+
if (ret < 0)
838+
return ret;
839+
port->irq = ret;
839840

840841
clk = clk_get(&pdev->dev, "refclk");
841842
if (IS_ERR(clk) && pdev->dev.of_node)
@@ -845,7 +846,6 @@ static int bcm_uart_probe(struct platform_device *pdev)
845846
return -ENODEV;
846847

847848
port->iotype = UPIO_MEM;
848-
port->irq = res_irq->start;
849849
port->ops = &bcm_uart_ops;
850850
port->flags = UPF_BOOT_AUTOCONF;
851851
port->dev = &pdev->dev;

0 commit comments

Comments
 (0)