summaryrefslogtreecommitdiff
path: root/sound/soc/stm
diff options
context:
space:
mode:
authorolivier moysan <olivier.moysan@st.com>2017-11-22 18:02:27 +0300
committerMark Brown <broonie@kernel.org>2017-11-27 16:09:53 +0300
commit512d1bb4e86bd0fd4d665d4e454a3486236a419f (patch)
treea1a0bb780cf0535f4c83445bc72ed958edd4db37 /sound/soc/stm
parent7dd0d835582ff72b0b3bd0f4fa074967dff1ce82 (diff)
downloadlinux-512d1bb4e86bd0fd4d665d4e454a3486236a419f.tar.xz
ASoC: stm32: sai: use devm_of_platform_populate()
Use devm_of_platform_populate() instead of of_platform_depopulate() to simplify driver code. Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org> Signed-off-by: Olivier Moysan <olivier.moysan@st.com> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/stm')
-rw-r--r--sound/soc/stm/stm32_sai.c11
1 files changed, 1 insertions, 10 deletions
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 0a1f06418bf4..d743b7dd52fb 100644
--- a/sound/soc/stm/stm32_sai.c
+++ b/sound/soc/stm/stm32_sai.c
@@ -124,7 +124,6 @@ static int stm32_sai_set_sync(struct stm32_sai_data *sai_client,
static int stm32_sai_probe(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
struct stm32_sai_data *sai;
struct reset_control *rst;
struct resource *res;
@@ -184,14 +183,7 @@ static int stm32_sai_probe(struct platform_device *pdev)
sai->set_sync = &stm32_sai_set_sync;
platform_set_drvdata(pdev, sai);
- return of_platform_populate(np, NULL, NULL, &pdev->dev);
-}
-
-static int stm32_sai_remove(struct platform_device *pdev)
-{
- of_platform_depopulate(&pdev->dev);
-
- return 0;
+ return devm_of_platform_populate(&pdev->dev);
}
MODULE_DEVICE_TABLE(of, stm32_sai_ids);
@@ -202,7 +194,6 @@ static struct platform_driver stm32_sai_driver = {
.of_match_table = stm32_sai_ids,
},
.probe = stm32_sai_probe,
- .remove = stm32_sai_remove,
};
module_platform_driver(stm32_sai_driver);