diff mbox series

[01/23] ASoC: atmel: atmel-pcm:dma.c: use devm_snd_dmaengine_pcm_register()

Message ID 871rzfkcxb.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show
Series ASoC: use devm_xxx | expand

Commit Message

Kuninori Morimoto June 27, 2019, 2 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

We have devm_xxx version of snd_dmaengine_pcm_register,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/atmel/atmel-pcm-dma.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Amadeusz Sławiński June 27, 2019, 7:43 a.m. UTC | #1
On 27 Jun 2019 11:00:01 +0900
Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:

> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> 
> We have devm_xxx version of snd_dmaengine_pcm_register,
> let's use it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  sound/soc/atmel/atmel-pcm-dma.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/sound/soc/atmel/atmel-pcm-dma.c
> b/sound/soc/atmel/atmel-pcm-dma.c index 042e593..9abf072 100644
> --- a/sound/soc/atmel/atmel-pcm-dma.c
> +++ b/sound/soc/atmel/atmel-pcm-dma.c
> @@ -111,13 +111,13 @@ static const struct snd_dmaengine_pcm_config
> atmel_dmaengine_pcm_config = { 
>  int atmel_pcm_dma_platform_register(struct device *dev)
>  {
> -	return snd_dmaengine_pcm_register(dev,
> &atmel_dmaengine_pcm_config, 0);
> +	return devm_snd_dmaengine_pcm_register(dev,
> +					&atmel_dmaengine_pcm_config,
> 0); }
>  EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
>  
>  void atmel_pcm_dma_platform_unregister(struct device *dev)
>  {
> -	snd_dmaengine_pcm_unregister(dev);
>  }
>  EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
>  

Do we need to keep empty function?
Codrin Ciubotariu June 27, 2019, 8:20 a.m. UTC | #2
On 27.06.2019 10:43, Amadeusz Sławiński wrote:
> External E-Mail
> 
> 
> On 27 Jun 2019 11:00:01 +0900
> Kuninori Morimoto <kuninori.morimoto.gx@renesas.com> wrote:
> 
>> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>>
>> We have devm_xxx version of snd_dmaengine_pcm_register,
>> let's use it.
>>
>> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> ---
>>   sound/soc/atmel/atmel-pcm-dma.c | 4 ++--
>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/sound/soc/atmel/atmel-pcm-dma.c
>> b/sound/soc/atmel/atmel-pcm-dma.c index 042e593..9abf072 100644
>> --- a/sound/soc/atmel/atmel-pcm-dma.c
>> +++ b/sound/soc/atmel/atmel-pcm-dma.c
>> @@ -111,13 +111,13 @@ static const struct snd_dmaengine_pcm_config
>> atmel_dmaengine_pcm_config = {
>>   int atmel_pcm_dma_platform_register(struct device *dev)
>>   {
>> -	return snd_dmaengine_pcm_register(dev,
>> &atmel_dmaengine_pcm_config, 0);
>> +	return devm_snd_dmaengine_pcm_register(dev,
>> +					&atmel_dmaengine_pcm_config,
>> 0); }
>>   EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
>>   
>>   void atmel_pcm_dma_platform_unregister(struct device *dev)
>>   {
>> -	snd_dmaengine_pcm_unregister(dev);
>>   }
>>   EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
>>   
> 
> Do we need to keep empty function?

Most probably not... Kuninori, let me know if you want me to remove 
atmel_pcm_dma_platform_unregister() from everywhere.

Thank you for your patch.

Best regards,
Codrin
Kuninori Morimoto June 27, 2019, 8:24 a.m. UTC | #3
Hi Codrin

Thank you for your feedback

> >> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >>
> >> We have devm_xxx version of snd_dmaengine_pcm_register,
> >> let's use it.
> >>
> >> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >> ---
(snip)
> >>   void atmel_pcm_dma_platform_unregister(struct device *dev)
> >>   {
> >> -	snd_dmaengine_pcm_unregister(dev);
> >>   }
> >>   EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);
> >>   
> > 
> > Do we need to keep empty function?
> 
> Most probably not... Kuninori, let me know if you want me to remove 
> atmel_pcm_dma_platform_unregister() from everywhere.

I'm asking it to Mark now.
pattern1 is I will post v2 which cares empty function.
pattern2 is I will post "remove empty function" patch set.

Anyway, thank you for your help !!

Thank you for your help !!
Best regards
---
Kuninori Morimoto
Mark Brown June 27, 2019, 11:38 a.m. UTC | #4
On Thu, Jun 27, 2019 at 05:24:37PM +0900, Kuninori Morimoto wrote:

> I'm asking it to Mark now.
> pattern1 is I will post v2 which cares empty function.
> pattern2 is I will post "remove empty function" patch set.

Removing the empty functions immediately is probably best.
Kuninori Morimoto June 28, 2019, 1:53 a.m. UTC | #5
Hi Mark

> > I'm asking it to Mark now.
> > pattern1 is I will post v2 which cares empty function.
> > pattern2 is I will post "remove empty function" patch set.
> 
> Removing the empty functions immediately is probably best.

OK, I will post v2

Thank you for your help !!
Best regards
---
Kuninori Morimoto
diff mbox series

Patch

diff --git a/sound/soc/atmel/atmel-pcm-dma.c b/sound/soc/atmel/atmel-pcm-dma.c
index 042e593..9abf072 100644
--- a/sound/soc/atmel/atmel-pcm-dma.c
+++ b/sound/soc/atmel/atmel-pcm-dma.c
@@ -111,13 +111,13 @@  static const struct snd_dmaengine_pcm_config atmel_dmaengine_pcm_config = {
 
 int atmel_pcm_dma_platform_register(struct device *dev)
 {
-	return snd_dmaengine_pcm_register(dev, &atmel_dmaengine_pcm_config, 0);
+	return devm_snd_dmaengine_pcm_register(dev,
+					&atmel_dmaengine_pcm_config, 0);
 }
 EXPORT_SYMBOL(atmel_pcm_dma_platform_register);
 
 void atmel_pcm_dma_platform_unregister(struct device *dev)
 {
-	snd_dmaengine_pcm_unregister(dev);
 }
 EXPORT_SYMBOL(atmel_pcm_dma_platform_unregister);