diff mbox series

[17/46] dmaengine: stm32-mdma: use dmaenginem_async_device_register to simplify the code

Message ID 20180803072016.21544-18-sjhuang@iluvatar.ai (mailing list archive)
State Changes Requested
Headers show
Series Use dmaenginem_async_device_register to simplify code | expand

Commit Message

Huang Shijie Aug. 3, 2018, 7:19 a.m. UTC
Use dmaenginem_async_device_register to simplify the code:
	remove dma_async_device_unregister.

Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
---
 drivers/dma/stm32-mdma.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Comments

Pierre Yves MORDRET Aug. 3, 2018, 8:10 a.m. UTC | #1
Acked-by: Pierre-Yves MORDRET <pierre-yves.mordret@st.com>

On 08/03/2018 09:19 AM, Huang Shijie wrote:
> Use dmaenginem_async_device_register to simplify the code:
> 	remove dma_async_device_unregister.
> 
> Signed-off-by: Huang Shijie <sjhuang@iluvatar.ai>
> ---
>  drivers/dma/stm32-mdma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
> index 06dd1725375e..390e4cae0e1a 100644
> --- a/drivers/dma/stm32-mdma.c
> +++ b/drivers/dma/stm32-mdma.c
> @@ -1656,7 +1656,7 @@ static int stm32_mdma_probe(struct platform_device *pdev)
>  		return ret;
>  	}
>  
> -	ret = dma_async_device_register(dd);
> +	ret = dmaenginem_async_device_register(dd);
>  	if (ret)
>  		return ret;
>  
> @@ -1674,8 +1674,6 @@ static int stm32_mdma_probe(struct platform_device *pdev)
>  	return 0;
>  
>  err_unregister:
> -	dma_async_device_unregister(dd);
> -
>  	return ret;
>  }
>  
> 
--
To unsubscribe from this list: send the line "unsubscribe dmaengine" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox series

Patch

diff --git a/drivers/dma/stm32-mdma.c b/drivers/dma/stm32-mdma.c
index 06dd1725375e..390e4cae0e1a 100644
--- a/drivers/dma/stm32-mdma.c
+++ b/drivers/dma/stm32-mdma.c
@@ -1656,7 +1656,7 @@  static int stm32_mdma_probe(struct platform_device *pdev)
 		return ret;
 	}
 
-	ret = dma_async_device_register(dd);
+	ret = dmaenginem_async_device_register(dd);
 	if (ret)
 		return ret;
 
@@ -1674,8 +1674,6 @@  static int stm32_mdma_probe(struct platform_device *pdev)
 	return 0;
 
 err_unregister:
-	dma_async_device_unregister(dd);
-
 	return ret;
 }