lkml.org 
[lkml]   [2017]   [Aug]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v2 06/10] ASoC: mxs-sgtl5000: Remove unnecessary function call
Date
The work of the function platform_set_drvdata is done by
devm_snd_soc_register_card.

Signed-off-by: Peng Donglin <dolinux.peng@gmail.com>
---
sound/soc/mxs/mxs-sgtl5000.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/sound/soc/mxs/mxs-sgtl5000.c b/sound/soc/mxs/mxs-sgtl5000.c
index a96276e77332..90ca6f9131a1 100644
--- a/sound/soc/mxs/mxs-sgtl5000.c
+++ b/sound/soc/mxs/mxs-sgtl5000.c
@@ -140,16 +140,13 @@ static int mxs_sgtl5000_probe(struct platform_device *pdev)
}

card->dev = &pdev->dev;
- platform_set_drvdata(pdev, card);

ret = devm_snd_soc_register_card(&pdev->dev, card);
- if (ret) {
+ if (ret)
dev_err(&pdev->dev, "snd_soc_register_card failed (%d)\n",
ret);
- return ret;
- }

- return 0;
+ return ret;
}

static int mxs_sgtl5000_remove(struct platform_device *pdev)
--
2.14.1
\
 
 \ /
  Last update: 2017-08-23 14:20    [W:0.124 / U:0.812 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site