From: Olivier Moysan <olivier.moysan@st.com>
To: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz,
tiwai@suse.com, mcoquelin.stm32@gmail.com,
alexandre.torgue@st.com, alsa-devel@alsa-project.org,
robh@kernel.org, mark.rutland@arm.com,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
kernel@stlinux.com, linux-kernel@vger.kernel.org,
olivier.moysan@st.com
Cc: arnaud.pouliquen@st.com, benjamin.gaignard@st.com,
Benjamin Gaignard <benjamin.gaignard@linaro.org>
Subject: [PATCH 3/3] ASoC: stm32: sai: use devm_of_platform_populate()
Date: Wed, 22 Nov 2017 16:02:27 +0100 [thread overview]
Message-ID: <1511362947-14747-4-git-send-email-olivier.moysan@st.com> (raw)
In-Reply-To: <1511362947-14747-1-git-send-email-olivier.moysan@st.com>
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>
---
sound/soc/stm/stm32_sai.c | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --git a/sound/soc/stm/stm32_sai.c b/sound/soc/stm/stm32_sai.c
index 0a1f064..d743b7d 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 int stm32_sai_remove(struct platform_device *pdev)
.of_match_table = stm32_sai_ids,
},
.probe = stm32_sai_probe,
- .remove = stm32_sai_remove,
};
module_platform_driver(stm32_sai_driver);
--
1.9.1
next prev parent reply other threads:[~2017-11-22 15:02 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 15:02 [PATCH 0/3] ASoC: stm32: sai: fixes related to synchro feature Olivier Moysan
2017-11-22 15:02 ` [PATCH 1/3] ASoC: stm32: fix sync property description in SAI bindings Olivier Moysan
[not found] ` <1511362947-14747-2-git-send-email-olivier.moysan-qxv4g6HH51o@public.gmane.org>
2017-11-26 19:05 ` Rob Herring
2017-11-27 18:53 ` Applied "ASoC: stm32: fix sync property description in SAI bindings" to the asoc tree Mark Brown
2017-11-22 15:02 ` [PATCH 2/3] ASoC: stm32: sai: simplify sync modes management Olivier Moysan
2017-11-27 18:53 ` Applied "ASoC: stm32: sai: simplify sync modes management" to the asoc tree Mark Brown
2017-11-22 15:02 ` Olivier Moysan [this message]
2017-11-27 18:53 ` Applied "ASoC: stm32: sai: use devm_of_platform_populate()" " 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=1511362947-14747-4-git-send-email-olivier.moysan@st.com \
--to=olivier.moysan@st.com \
--cc=alexandre.torgue@st.com \
--cc=alsa-devel@alsa-project.org \
--cc=arnaud.pouliquen@st.com \
--cc=benjamin.gaignard@linaro.org \
--cc=benjamin.gaignard@st.com \
--cc=broonie@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@stlinux.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=perex@perex.cz \
--cc=robh@kernel.org \
--cc=tiwai@suse.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;
as well as URLs for NNTP newsgroup(s).