From: John Stultz <john.stultz@linaro.org>
To: lkml <linux-kernel@vger.kernel.org>
Cc: John Stultz <john.stultz@linaro.org>,
Zhangfei Gao <zhangfei.gao@linaro.org>,
Liam Girdwood <lgirdwood@gmail.com>,
Mark Brown <broonie@kernel.org>, Jaroslav Kysela <perex@perex.cz>,
Wei Xu <xuwei5@hisilicon.com>, Rob Herring <robh+dt@kernel.org>,
Andy Green <andy@warmcat.com>, Dave Long <dave.long@linaro.org>,
Guodong Xu <guodong.xu@linaro.org>
Subject: [PATCH 3/3] ASoC: hisilicon: Use devm_snd_soc_register_component
Date: Tue, 11 Apr 2017 12:15:18 -0700 [thread overview]
Message-ID: <1491938118-19108-3-git-send-email-john.stultz@linaro.org> (raw)
In-Reply-To: <1491938118-19108-1-git-send-email-john.stultz@linaro.org>
Per feedback from Mark Brown, this patch updates the hi6210-i2s
driver to use devm_snd_soc_register_component which simplifies
the logic a bit.
Cc: Zhangfei Gao <zhangfei.gao@linaro.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>
Cc: Mark Brown <broonie@kernel.org>
Cc: Jaroslav Kysela <perex@perex.cz>
Cc: Wei Xu <xuwei5@hisilicon.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Andy Green <andy@warmcat.com>
Cc: Dave Long <dave.long@linaro.org>
Cc: Guodong Xu <guodong.xu@linaro.org>
Signed-off-by: John Stultz <john.stultz@linaro.org>
---
sound/soc/hisilicon/hi6210-i2s.c | 18 ++----------------
1 file changed, 2 insertions(+), 16 deletions(-)
diff --git a/sound/soc/hisilicon/hi6210-i2s.c b/sound/soc/hisilicon/hi6210-i2s.c
index 27553dc..45163e5 100644
--- a/sound/soc/hisilicon/hi6210-i2s.c
+++ b/sound/soc/hisilicon/hi6210-i2s.c
@@ -591,22 +591,9 @@ static int hi6210_i2s_probe(struct platform_device *pdev)
if (ret)
return ret;
- ret = snd_soc_register_component(&pdev->dev, &hi6210_i2s_i2s_comp,
+ ret = devm_snd_soc_register_component(&pdev->dev, &hi6210_i2s_i2s_comp,
&i2s->dai, 1);
- if (ret) {
- dev_err(&pdev->dev, "Failed to register dai\n");
- return ret;
- }
-
- return 0;
-}
-
-static int hi6210_i2s_remove(struct platform_device *pdev)
-{
- snd_soc_unregister_component(&pdev->dev);
- dev_set_drvdata(&pdev->dev, NULL);
-
- return 0;
+ return ret;
}
static const struct of_device_id hi6210_i2s_dt_ids[] = {
@@ -618,7 +605,6 @@ MODULE_DEVICE_TABLE(of, hi6210_i2s_dt_ids);
static struct platform_driver hi6210_i2s_driver = {
.probe = hi6210_i2s_probe,
- .remove = hi6210_i2s_remove,
.driver = {
.name = "hi6210_i2s",
.of_match_table = hi6210_i2s_dt_ids,
--
2.7.4
prev parent reply other threads:[~2017-04-11 19:15 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-04-11 19:15 [PATCH 1/3] ASoC: hisilicon: Add error returns even for cases that shouldn't happen John Stultz
2017-04-11 19:15 ` [PATCH 2/3] ASoC: hisilicon: Address style nit to use break in final default of switch statement John Stultz
2017-04-11 19:15 ` John Stultz [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=1491938118-19108-3-git-send-email-john.stultz@linaro.org \
--to=john.stultz@linaro.org \
--cc=andy@warmcat.com \
--cc=broonie@kernel.org \
--cc=dave.long@linaro.org \
--cc=guodong.xu@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=perex@perex.cz \
--cc=robh+dt@kernel.org \
--cc=xuwei5@hisilicon.com \
--cc=zhangfei.gao@linaro.org \
/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
all inboxes | Powered by JetHome®