@@ -581,13 +581,13 @@ static irqreturn_t qcom_pcie_ep_perst_irq_thread(int irq, void *data)
581
581
static int qcom_pcie_ep_enable_irq_resources (struct platform_device * pdev ,
582
582
struct qcom_pcie_ep * pcie_ep )
583
583
{
584
- int irq , ret ;
584
+ int ret ;
585
585
586
- irq = platform_get_irq_byname (pdev , "global" );
587
- if (irq < 0 )
588
- return irq ;
586
+ pcie_ep -> global_irq = platform_get_irq_byname (pdev , "global" );
587
+ if (pcie_ep -> global_irq < 0 )
588
+ return pcie_ep -> global_irq ;
589
589
590
- ret = devm_request_threaded_irq (& pdev -> dev , irq , NULL ,
590
+ ret = devm_request_threaded_irq (& pdev -> dev , pcie_ep -> global_irq , NULL ,
591
591
qcom_pcie_ep_global_irq_thread ,
592
592
IRQF_ONESHOT ,
593
593
"global_irq" , pcie_ep );
@@ -604,7 +604,7 @@ static int qcom_pcie_ep_enable_irq_resources(struct platform_device *pdev,
604
604
"perst_irq" , pcie_ep );
605
605
if (ret ) {
606
606
dev_err (& pdev -> dev , "Failed to request PERST IRQ\n" );
607
- disable_irq (irq );
607
+ disable_irq (pcie_ep -> global_irq );
608
608
return ret ;
609
609
}
610
610
@@ -702,6 +702,9 @@ static int qcom_pcie_ep_remove(struct platform_device *pdev)
702
702
{
703
703
struct qcom_pcie_ep * pcie_ep = platform_get_drvdata (pdev );
704
704
705
+ disable_irq (pcie_ep -> global_irq );
706
+ disable_irq (pcie_ep -> perst_irq );
707
+
705
708
if (pcie_ep -> link_status == QCOM_PCIE_EP_LINK_DISABLED )
706
709
return 0 ;
707
710
0 commit comments