History

mtd: rawnand: gpmi: Use platform_get_irq_byname() to get the interrupt

platform_get_resource_byname(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_byname().

Lad Prabhakar committed 4 years ago

Commit ecb78b21 parent 3b2af5c1 file · +4 −7Browse files

Unified · Split

drivers/mtd/nand/raw/gpmi-nand/gpmi-nand.c+4−7
@@ -991,16 +991,13 @@ static int acquire_bch_irq(struct gpmi_nand_data *this, irq_handler_t irq_h) · 990 unmodified lines
991{991{
992 struct platform_device *pdev = this->pdev;992 struct platform_device *pdev = this->pdev;
993 const char *res_name = GPMI_NAND_BCH_INTERRUPT_RES_NAME;993 const char *res_name = GPMI_NAND_BCH_INTERRUPT_RES_NAME;
994 struct resource *r;
995 int err;994 int err;
996 995
997 r = platform_get_resource_byname(pdev, IORESOURCE_IRQ, res_name);996 err = platform_get_irq_byname(pdev, res_name);
998 if (!r) {997 if (err < 0)
999 dev_err(this->dev, "Can't get resource for %s\n", res_name);998 return err;
1000 return -ENODEV;
1001 }
1002 999
1003 err = devm_request_irq(this->dev, r->start, irq_h, 0, res_name, this);1000 err = devm_request_irq(this->dev, err, irq_h, 0, res_name, this);
1004 if (err)1001 if (err)
1005 dev_err(this->dev, "error requesting BCH IRQ\n");1002 dev_err(this->dev, "error requesting BCH IRQ\n");
1006 1003