[alsa-devel] [PATCH 2/2] ASoC: SPEAr spdif_out: Use devm_snd_soc_register_component
Viresh Kumar
viresh.kumar at linaro.org
Tue Sep 17 07:34:18 CEST 2013
On Tue, Sep 17, 2013 at 10:41 AM, Sachin Kamat <sachin.kamat at linaro.org> wrote:
> devm_snd_soc_register_component makes code simpler.
>
> Signed-off-by: Sachin Kamat <sachin.kamat at linaro.org>
> ---
> sound/soc/spear/spdif_out.c | 12 ++----------
> 1 file changed, 2 insertions(+), 10 deletions(-)
>
> diff --git a/sound/soc/spear/spdif_out.c b/sound/soc/spear/spdif_out.c
> index 2fdf68c..70fc4d6 100644
> --- a/sound/soc/spear/spdif_out.c
> +++ b/sound/soc/spear/spdif_out.c
> @@ -307,18 +307,11 @@ static int spdif_out_probe(struct platform_device *pdev)
>
> dev_set_drvdata(&pdev->dev, host);
>
> - ret = snd_soc_register_component(&pdev->dev, &spdif_out_component,
> - &spdif_out_dai, 1);
> + ret = devm_snd_soc_register_component(&pdev->dev, &spdif_out_component,
> + &spdif_out_dai, 1);
> return ret;
> }
>
What about doing return devm_snd_soc_register_component(***) here?
And same for the other patch?
Acked-by: Viresh Kumar <viresh.kumar at linaro.org>
More information about the Alsa-devel
mailing list