From: benjamin.gaignard@linaro.org (Benjamin Gaignard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate
Date: Mon, 29 May 2017 17:45:53 +0200 [thread overview]
Message-ID: <1496072763-31209-6-git-send-email-benjamin.gaignard@linaro.org> (raw)
In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org>
Use devm_of_platform_populate() instead of of_platform_populate()
and suppress stm32_timers_remove() which become useless.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
CC: Lee Jones <lee.jones@linaro.org>
CC: Alexandre Torgue <alexandre.torgue@st.com>
CC: linux-arm-kernel at lists.infradead.org
CC: linux-kernel at vger.kernel.org
---
drivers/mfd/stm32-timers.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/mfd/stm32-timers.c b/drivers/mfd/stm32-timers.c
index 2182f00..a6675a4 100644
--- a/drivers/mfd/stm32-timers.c
+++ b/drivers/mfd/stm32-timers.c
@@ -58,14 +58,7 @@ static int stm32_timers_probe(struct platform_device *pdev)
platform_set_drvdata(pdev, ddata);
- return of_platform_populate(pdev->dev.of_node, NULL, NULL, &pdev->dev);
-}
-
-static int stm32_timers_remove(struct platform_device *pdev)
-{
- of_platform_depopulate(&pdev->dev);
-
- return 0;
+ return devm_of_platform_populate(&pdev->dev);
}
static const struct of_device_id stm32_timers_of_match[] = {
@@ -76,7 +69,6 @@ static int stm32_timers_remove(struct platform_device *pdev)
static struct platform_driver stm32_timers_driver = {
.probe = stm32_timers_probe,
- .remove = stm32_timers_remove,
.driver = {
.name = "stm32-timers",
.of_match_table = stm32_timers_of_match,
--
1.9.1
next prev parent reply other threads:[~2017-05-29 15:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-29 15:45 [PATCH 00/15] make more driver use devm_of_platform_populate() Benjamin Gaignard
2017-05-29 15:45 ` [PATCH 01/15] iio: adc: stm32: " Benjamin Gaignard
2017-05-29 16:00 ` Jonathan Cameron
2017-05-29 16:03 ` Fabrice Gasnier
2017-05-29 15:45 ` [PATCH 02/15] iio: dac: " Benjamin Gaignard
2017-05-29 16:10 ` Fabrice Gasnier
2017-05-29 15:45 ` Benjamin Gaignard [this message]
2017-05-30 9:29 ` [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate Lee Jones
2017-05-29 15:45 ` [PATCH 08/15] mfd: exynos: use devm_of_platform_populate() Benjamin Gaignard
2017-05-30 9:31 ` Lee Jones
2017-05-29 15:46 ` [PATCH 14/15] sound: stm32: " Benjamin Gaignard
2017-05-30 9:03 ` Olivier MOYSAN
2017-05-29 15:46 ` [PATCH 15/15] media: exynos4-is: " Benjamin Gaignard
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=1496072763-31209-6-git-send-email-benjamin.gaignard@linaro.org \
--to=benjamin.gaignard@linaro.org \
--cc=linux-arm-kernel@lists.infradead.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;
as well as URLs for NNTP newsgroup(s).