Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1440460

Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq

From Robin Murphy <robin.murphy@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq
Date 2016-07-11 12:40 +0200
Message-ID <rTGN4-5On-21@gated-at.bofh.it> (permalink)
References <rR8wa-3U6-37@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 04/07/16 10:38, Peng Fan wrote:
> Use devm_request_irq to simplify error handling path,
> when probe smmu device.
> 
> Also devm_{request|free}_irq when init or destroy domain context.
> 
> Signed-off-by: Peng Fan <van.freenix@gmail.com>
> Cc: Will Deacon <will.deacon@arm.com>
> Cc: Robin Murphy <robin.murphy@arm.com>
> ---
[...]
> @@ -2050,7 +2046,7 @@ static int arm_smmu_device_remove(struct platform_device *pdev)
>  		dev_err(dev, "removing device with active domains!\n");
>  
>  	for (i = 0; i < smmu->num_global_irqs; ++i)
> -		free_irq(smmu->irqs[i], smmu);
> +		devm_free_irq(smmu->dev, smmu->irqs[i], smmu);

There shouldn't be any need for this at all, since the very next thing
called after drv->remove() is devres_release_all().

Robin.

>  
>  	/* Turn the thing off */
>  	writel(sCR0_CLIENTPD, ARM_SMMU_GR0_NS(smmu) + ARM_SMMU_GR0_sCR0);
> 

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Peng Fan <van.freenix@gmail.com> - 2016-07-04 11:40 +0200
  Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Will Deacon <will.deacon@arm.com> - 2016-07-11 12:40 +0200
  Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Robin Murphy <robin.murphy@arm.com> - 2016-07-11 12:40 +0200
    Re: [PATCH] iommu: arm-smmu: use devm_request_irq and devm_free_irq Peng Fan <van.freenix@gmail.com> - 2016-07-12 03:30 +0200

csiph-web