From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Wei Yongjun <weiyj.lk@gmail.com>,
Jarkko Nikula <jarkko.nikula@bitmer.com>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Takashi Iwai <tiwai@suse.com>
Cc: alsa-devel@alsa-project.org, linux-omap@vger.kernel.org,
Wei Yongjun <weiyongjun1@huawei.com>
Subject: Re: [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()
Date: Wed, 24 Aug 2016 10:01:51 +0300 [thread overview]
Message-ID: <6b695e17-37b4-6c53-04df-be21fe28a97d@ti.com> (raw)
In-Reply-To: <1471993817-10903-1-git-send-email-weiyj.lk@gmail.com>
On 08/24/16 02:10, Wei Yongjun wrote:
> From: Wei Yongjun <weiyongjun1@huawei.com>
>
> Using devm_snd_soc_register_card() can make the code
> shorter and cleaner.
Acked-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
> ---
> sound/soc/omap/omap-abe-twl6040.c | 14 ++------------
> 1 file changed, 2 insertions(+), 12 deletions(-)
>
> diff --git a/sound/soc/omap/omap-abe-twl6040.c b/sound/soc/omap/omap-abe-twl6040.c
> index f61b3b5..89fe95e 100644
> --- a/sound/soc/omap/omap-abe-twl6040.c
> +++ b/sound/soc/omap/omap-abe-twl6040.c
> @@ -305,23 +305,14 @@ static int omap_abe_probe(struct platform_device *pdev)
>
> snd_soc_card_set_drvdata(card, priv);
>
> - ret = snd_soc_register_card(card);
> + ret = devm_snd_soc_register_card(&pdev->dev, card);
> if (ret)
> - dev_err(&pdev->dev, "snd_soc_register_card() failed: %d\n",
> + dev_err(&pdev->dev, "devm_snd_soc_register_card() failed: %d\n",
> ret);
>
> return ret;
> }
>
> -static int omap_abe_remove(struct platform_device *pdev)
> -{
> - struct snd_soc_card *card = platform_get_drvdata(pdev);
> -
> - snd_soc_unregister_card(card);
> -
> - return 0;
> -}
> -
> static const struct of_device_id omap_abe_of_match[] = {
> {.compatible = "ti,abe-twl6040", },
> { },
> @@ -335,7 +326,6 @@ static struct platform_driver omap_abe_driver = {
> .of_match_table = omap_abe_of_match,
> },
> .probe = omap_abe_probe,
> - .remove = omap_abe_remove,
> };
>
> static int __init omap_abe_init(void)
>
>
>
--
Péter
next prev parent reply other threads:[~2016-08-24 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-23 23:10 [PATCH -next] ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card() Wei Yongjun
2016-08-24 7:01 ` Peter Ujfalusi [this message]
2016-08-24 11:20 ` Applied "ASoC: omap-abe-twl6040: Use devm_snd_soc_register_card()" to the asoc tree Mark Brown
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=6b695e17-37b4-6c53-04df-be21fe28a97d@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=jarkko.nikula@bitmer.com \
--cc=lgirdwood@gmail.com \
--cc=linux-omap@vger.kernel.org \
--cc=perex@perex.cz \
--cc=tiwai@suse.com \
--cc=weiyj.lk@gmail.com \
--cc=weiyongjun1@huawei.com \
/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