[alsa-devel] [PATCH 03/23] ASoC: tegra: tegra_pcm.c: use devm_snd_dmaengine_pcm_register()

Amadeusz Sławiński amadeuszx.slawinski at linux.intel.com
Thu Jun 27 09:43:26 CEST 2019


On 27 Jun 2019 11:00:10 +0900
Kuninori Morimoto <kuninori.morimoto.gx at renesas.com> wrote:

> From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> 
> We have devm_xxx version of snd_dmaengine_pcm_register,
> let's use it.
> 
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
> ---
>  sound/soc/tegra/tegra_pcm.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/sound/soc/tegra/tegra_pcm.c b/sound/soc/tegra/tegra_pcm.c
> index f246df8..1814791 100644
> --- a/sound/soc/tegra/tegra_pcm.c
> +++ b/sound/soc/tegra/tegra_pcm.c
> @@ -44,7 +44,8 @@ static const struct snd_dmaengine_pcm_config
> tegra_dmaengine_pcm_config = { 
>  int tegra_pcm_platform_register(struct device *dev)
>  {
> -	return snd_dmaengine_pcm_register(dev,
> &tegra_dmaengine_pcm_config, 0);
> +	return devm_snd_dmaengine_pcm_register(dev,
> +					&tegra_dmaengine_pcm_config,
> 0); }
>  EXPORT_SYMBOL_GPL(tegra_pcm_platform_register);
>  
> @@ -57,13 +58,12 @@ int
> tegra_pcm_platform_register_with_chan_names(struct device *dev,
> config->chan_names[0] = txdmachan; config->chan_names[1] = rxdmachan;
>  
> -	return snd_dmaengine_pcm_register(dev, config, 0);
> +	return devm_snd_dmaengine_pcm_register(dev, config, 0);
>  }
>  EXPORT_SYMBOL_GPL(tegra_pcm_platform_register_with_chan_names);
>  
>  void tegra_pcm_platform_unregister(struct device *dev)
>  {
> -	return snd_dmaengine_pcm_unregister(dev);
>  }
>  EXPORT_SYMBOL_GPL(tegra_pcm_platform_unregister);
>  

Again, do we need to keep empty function?


More information about the Alsa-devel mailing list