[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1491938118-19108-3-git-send-email-john.stultz@linaro.org>
Date: Tue, 11 Apr 2017 12:15:18 -0700
From: John Stultz <john.stultz@...aro.org>
To: lkml <linux-kernel@...r.kernel.org>
Cc: John Stultz <john.stultz@...aro.org>,
Zhangfei Gao <zhangfei.gao@...aro.org>,
Liam Girdwood <lgirdwood@...il.com>,
Mark Brown <broonie@...nel.org>,
Jaroslav Kysela <perex@...ex.cz>,
Wei Xu <xuwei5@...ilicon.com>,
Rob Herring <robh+dt@...nel.org>,
Andy Green <andy@...mcat.com>,
Dave Long <dave.long@...aro.org>,
Guodong Xu <guodong.xu@...aro.org>
Subject: [PATCH 3/3] ASoC: hisilicon: Use devm_snd_soc_register_component
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@...aro.org>
Cc: Liam Girdwood <lgirdwood@...il.com>
Cc: Mark Brown <broonie@...nel.org>
Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Wei Xu <xuwei5@...ilicon.com>
Cc: Rob Herring <robh+dt@...nel.org>
Cc: Andy Green <andy@...mcat.com>
Cc: Dave Long <dave.long@...aro.org>
Cc: Guodong Xu <guodong.xu@...aro.org>
Signed-off-by: John Stultz <john.stultz@...aro.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
Powered by blists - more mailing lists