mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	dmaengine: mv_xor_v2: explicitly freeup irq
dmaengine device should explicitly call devm_free_irq() when using devm_request_irq(). The irq is still ON when devices remove is executed and irq should be quiesced before remove is completed. Signed-off-by: Hanna Hawa <hannah@marvell.com> Signed-off-by: Vinod Koul <vkoul@kernel.org>
This commit is contained in:
		
							parent
							
								
									ce397d215c
								
							
						
					
					
						commit
						48c008b591
					
				
					 1 changed files with 4 additions and 0 deletions
				
			
		| 
						 | 
					@ -174,6 +174,7 @@ struct mv_xor_v2_device {
 | 
				
			||||||
	int desc_size;
 | 
						int desc_size;
 | 
				
			||||||
	unsigned int npendings;
 | 
						unsigned int npendings;
 | 
				
			||||||
	unsigned int hw_queue_idx;
 | 
						unsigned int hw_queue_idx;
 | 
				
			||||||
 | 
						struct msi_desc *msi_desc;
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/**
 | 
					/**
 | 
				
			||||||
| 
						 | 
					@ -780,6 +781,7 @@ static int mv_xor_v2_probe(struct platform_device *pdev)
 | 
				
			||||||
	msi_desc = first_msi_entry(&pdev->dev);
 | 
						msi_desc = first_msi_entry(&pdev->dev);
 | 
				
			||||||
	if (!msi_desc)
 | 
						if (!msi_desc)
 | 
				
			||||||
		goto free_msi_irqs;
 | 
							goto free_msi_irqs;
 | 
				
			||||||
 | 
						xor_dev->msi_desc = msi_desc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	ret = devm_request_irq(&pdev->dev, msi_desc->irq,
 | 
						ret = devm_request_irq(&pdev->dev, msi_desc->irq,
 | 
				
			||||||
			       mv_xor_v2_interrupt_handler, 0,
 | 
								       mv_xor_v2_interrupt_handler, 0,
 | 
				
			||||||
| 
						 | 
					@ -897,6 +899,8 @@ static int mv_xor_v2_remove(struct platform_device *pdev)
 | 
				
			||||||
			  xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
 | 
								  xor_dev->desc_size * MV_XOR_V2_DESC_NUM,
 | 
				
			||||||
			  xor_dev->hw_desq_virt, xor_dev->hw_desq);
 | 
								  xor_dev->hw_desq_virt, xor_dev->hw_desq);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						devm_free_irq(&pdev->dev, xor_dev->msi_desc->irq, xor_dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	platform_msi_domain_free_irqs(&pdev->dev);
 | 
						platform_msi_domain_free_irqs(&pdev->dev);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	clk_disable_unprepare(xor_dev->clk);
 | 
						clk_disable_unprepare(xor_dev->clk);
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue