* [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq
@ 2021-03-19 8:56 Tian Tao
2021-03-23 23:56 ` Khalil Blaiech
2021-03-31 7:25 ` Wolfram Sang
0 siblings, 2 replies; 3+ messages in thread
From: Tian Tao @ 2021-03-19 8:56 UTC (permalink / raw)
To: kblaiech; +Cc: linux-i2c
Use devm_request_irq to request interrupts,devm_free_irq is
not needed to release interrupts. so just remove it.
Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
---
drivers/i2c/busses/i2c-mlxbf.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
index 2fb0532..ea839de 100644
--- a/drivers/i2c/busses/i2c-mlxbf.c
+++ b/drivers/i2c/busses/i2c-mlxbf.c
@@ -2426,8 +2426,6 @@ static int mlxbf_i2c_remove(struct platform_device *pdev)
}
mutex_unlock(&mlxbf_i2c_bus_lock);
- devm_free_irq(dev, priv->irq, priv);
-
i2c_del_adapter(&priv->adap);
return 0;
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* RE: [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq
2021-03-19 8:56 [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq Tian Tao
@ 2021-03-23 23:56 ` Khalil Blaiech
2021-03-31 7:25 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Khalil Blaiech @ 2021-03-23 23:56 UTC (permalink / raw)
To: Tian Tao; +Cc: linux-i2c
> -----Original Message-----
> From: Tian Tao <tiantao6@hisilicon.com>
> Sent: Friday, March 19, 2021 4:56 AM
> To: Khalil Blaiech <kblaiech@nvidia.com>
> Cc: linux-i2c@vger.kernel.org
> Subject: [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq
>
> Use devm_request_irq to request interrupts,devm_free_irq is
> not needed to release interrupts. so just remove it.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
> ---
> drivers/i2c/busses/i2c-mlxbf.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
> index 2fb0532..ea839de 100644
> --- a/drivers/i2c/busses/i2c-mlxbf.c
> +++ b/drivers/i2c/busses/i2c-mlxbf.c
> @@ -2426,8 +2426,6 @@ static int mlxbf_i2c_remove(struct platform_device
> *pdev)
> }
> mutex_unlock(&mlxbf_i2c_bus_lock);
>
> - devm_free_irq(dev, priv->irq, priv);
> -
Thanks.
Acked-by: Khalil Blaiech <kblaiech@nvidia.com>
> i2c_del_adapter(&priv->adap);
>
> return 0;
> --
> 2.7.4
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq
2021-03-19 8:56 [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq Tian Tao
2021-03-23 23:56 ` Khalil Blaiech
@ 2021-03-31 7:25 ` Wolfram Sang
1 sibling, 0 replies; 3+ messages in thread
From: Wolfram Sang @ 2021-03-31 7:25 UTC (permalink / raw)
To: Tian Tao; +Cc: kblaiech, linux-i2c
[-- Attachment #1: Type: text/plain, Size: 983 bytes --]
On Fri, Mar 19, 2021 at 04:56:05PM +0800, Tian Tao wrote:
> Use devm_request_irq to request interrupts,devm_free_irq is
> not needed to release interrupts. so just remove it.
>
> Signed-off-by: Tian Tao <tiantao6@hisilicon.com>
So, we are sure that interrupts can't happen anymore? Otherwise we would
get an OOPS because of the missing adapter. And if so, what about
the devm_release_mem_region() above. Can't they be removed, too?
> ---
> drivers/i2c/busses/i2c-mlxbf.c | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-mlxbf.c b/drivers/i2c/busses/i2c-mlxbf.c
> index 2fb0532..ea839de 100644
> --- a/drivers/i2c/busses/i2c-mlxbf.c
> +++ b/drivers/i2c/busses/i2c-mlxbf.c
> @@ -2426,8 +2426,6 @@ static int mlxbf_i2c_remove(struct platform_device *pdev)
> }
> mutex_unlock(&mlxbf_i2c_bus_lock);
>
> - devm_free_irq(dev, priv->irq, priv);
> -
> i2c_del_adapter(&priv->adap);
>
> return 0;
> --
> 2.7.4
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-03-31 7:26 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-19 8:56 [PATCH] i2c: mlxbf: Remove the unneeded devm_free_irq Tian Tao
2021-03-23 23:56 ` Khalil Blaiech
2021-03-31 7:25 ` Wolfram Sang
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.