[alsa-devel] [PATCH V2] ASoC: omap-mcbsp: Use devm_snd_soc_register_component

Peter Ujfalusi peter.ujfalusi at ti.com
Wed Jul 9 07:45:50 CEST 2014


On 07/08/2014 07:25 PM, Manish Badarkhe wrote:
> Replaced snd_soc_register_component with its devres equivalent,
> devm_snd_soc_register_component.
> 
> Signed-off-by: Manish Badarkhe <badarkhe.manish at gmail.com>

Acked-by: Peter Ujfalusi <peter.ujfalusi at ti.com>

> ---
> Changes since V1:
>         Aligned function parameter properly.
> 
> :100644 100644 efe2cd6... bd3ef2a... M	sound/soc/omap/omap-mcbsp.c
>  sound/soc/omap/omap-mcbsp.c |    7 +++----
>  1 file changed, 3 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/soc/omap/omap-mcbsp.c b/sound/soc/omap/omap-mcbsp.c
> index efe2cd6..bd3ef2a 100644
> --- a/sound/soc/omap/omap-mcbsp.c
> +++ b/sound/soc/omap/omap-mcbsp.c
> @@ -805,8 +805,9 @@ static int asoc_mcbsp_probe(struct platform_device *pdev)
>  	if (ret)
>  		return ret;
>  
> -	ret = snd_soc_register_component(&pdev->dev, &omap_mcbsp_component,
> -					 &omap_mcbsp_dai, 1);
> +	ret = devm_snd_soc_register_component(&pdev->dev,
> +					      &omap_mcbsp_component,
> +					      &omap_mcbsp_dai, 1);
>  	if (ret)
>  		return ret;
>  
> @@ -817,8 +818,6 @@ static int asoc_mcbsp_remove(struct platform_device *pdev)
>  {
>  	struct omap_mcbsp *mcbsp = platform_get_drvdata(pdev);
>  
> -	snd_soc_unregister_component(&pdev->dev);
> -
>  	if (mcbsp->pdata->ops && mcbsp->pdata->ops->free)
>  		mcbsp->pdata->ops->free(mcbsp->id);
>  
> 


-- 
Péter


More information about the Alsa-devel mailing list