ata: pata_pxa: 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(). Reported-by: Zeal Robot <zealci@zte.com.cn> Signed-off-by: Minghao Chi <chi.minghao@zte.com.cn> Reviewed-by: Sergey Shtylyov <s.shtylyov@omp.ru> Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
This commit is contained in:
parent
5e776d7b20
commit
d268afa1ff
@ -164,10 +164,10 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
|||||||
struct resource *cmd_res;
|
struct resource *cmd_res;
|
||||||
struct resource *ctl_res;
|
struct resource *ctl_res;
|
||||||
struct resource *dma_res;
|
struct resource *dma_res;
|
||||||
struct resource *irq_res;
|
|
||||||
struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
|
struct pata_pxa_pdata *pdata = dev_get_platdata(&pdev->dev);
|
||||||
struct dma_slave_config config;
|
struct dma_slave_config config;
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
|
int irq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Resource validation, three resources are needed:
|
* Resource validation, three resources are needed:
|
||||||
@ -205,9 +205,9 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
|||||||
/*
|
/*
|
||||||
* IRQ pin
|
* IRQ pin
|
||||||
*/
|
*/
|
||||||
irq_res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
|
irq = platform_get_irq(pdev, 0);
|
||||||
if (unlikely(irq_res == NULL))
|
if (irq < 0)
|
||||||
return -EINVAL;
|
return irq;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Allocate the host
|
* Allocate the host
|
||||||
@ -287,7 +287,7 @@ static int pxa_ata_probe(struct platform_device *pdev)
|
|||||||
/*
|
/*
|
||||||
* Activate the ATA host
|
* Activate the ATA host
|
||||||
*/
|
*/
|
||||||
ret = ata_host_activate(host, irq_res->start, ata_sff_interrupt,
|
ret = ata_host_activate(host, irq, ata_sff_interrupt,
|
||||||
pdata->irq_flags, &pxa_ata_sht);
|
pdata->irq_flags, &pxa_ata_sht);
|
||||||
if (ret)
|
if (ret)
|
||||||
dma_release_channel(data->dma_chan);
|
dma_release_channel(data->dma_chan);
|
||||||
|
Loading…
Reference in New Issue
Block a user