From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vaishali Thakkar <vthakkar1994@gmail.com>,
Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>,
Liam Girdwood <lgirdwood@gmail.com>,
Takashi Iwai <tiwai@suse.com>, Wolfram Sang <wsa@the-dreams.de>,
<alsa-devel@alsa-project.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component
Date: Mon, 17 Aug 2015 10:36:18 +0300 [thread overview]
Message-ID: <55D18EF2.8090300@ti.com> (raw)
In-Reply-To: <20150815023155.GA27364@localhost>
On 08/15/2015 05:31 AM, Vaishali Thakkar wrote:
> Use resource managed function devm_snd_soc_register_component for
> component registration instead of snd_soc_register_component.
>
> Also, remove davinci_vcif_remove as it is now redundant.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Vaishali Thakkar <vthakkar1994@gmail.com>
> ---
> sound/soc/davinci/davinci-vcif.c | 14 +++-----------
> 1 file changed, 3 insertions(+), 11 deletions(-)
>
> diff --git a/sound/soc/davinci/davinci-vcif.c b/sound/soc/davinci/davinci-vcif.c
> index fabd05f..c77d921 100644
> --- a/sound/soc/davinci/davinci-vcif.c
> +++ b/sound/soc/davinci/davinci-vcif.c
> @@ -231,8 +231,9 @@ static int davinci_vcif_probe(struct platform_device *pdev)
>
> dev_set_drvdata(&pdev->dev, davinci_vcif_dev);
>
> - ret = snd_soc_register_component(&pdev->dev, &davinci_vcif_component,
> - &davinci_vcif_dai, 1);
> + ret = devm_snd_soc_register_component(&pdev->dev,
> + &davinci_vcif_component,
> + &davinci_vcif_dai, 1);
> if (ret != 0) {
> dev_err(&pdev->dev, "could not register dai\n");
> return ret;
> @@ -241,23 +242,14 @@ static int davinci_vcif_probe(struct platform_device *pdev)
> ret = edma_pcm_platform_register(&pdev->dev);
> if (ret) {
> dev_err(&pdev->dev, "register PCM failed: %d\n", ret);
> - snd_soc_unregister_component(&pdev->dev);
> return ret;
> }
>
> return 0;
> }
>
> -static int davinci_vcif_remove(struct platform_device *pdev)
> -{
> - snd_soc_unregister_component(&pdev->dev);
> -
> - return 0;
> -}
> -
> static struct platform_driver davinci_vcif_driver = {
> .probe = davinci_vcif_probe,
> - .remove = davinci_vcif_remove,
> .driver = {
> .name = "davinci-vcif",
> },
>
--
Péter
prev parent reply other threads:[~2015-08-17 7:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-15 2:31 [PATCH] ASoC: davinci-vcif: Use devm_snd_soc_register_component Vaishali Thakkar
2015-08-17 7:36 ` Peter Ujfalusi [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=55D18EF2.8090300@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=vthakkar1994@gmail.com \
--cc=wsa@the-dreams.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox