From: benjamin.gaignard@linaro.org (Benjamin Gaignard)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 15/15] media: exynos4-is: use devm_of_platform_populate()
Date: Mon, 29 May 2017 17:46:03 +0200 [thread overview]
Message-ID: <1496072763-31209-16-git-send-email-benjamin.gaignard@linaro.org> (raw)
In-Reply-To: <1496072763-31209-1-git-send-email-benjamin.gaignard@linaro.org>
Usage of devm_of_platform_populate() simplify driver code
and save somes lines
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
CC: Kyungmin Park <kyungmin.park@samsung.com>
CC: Sylwester Nawrocki <s.nawrocki@samsung.com>
CC: Mauro Carvalho Chehab <mchehab@kernel.org>
CC: Kukjin Kim <kgene@kernel.org>
CC: Krzysztof Kozlowski <krzk@kernel.org>
CC: Javier Martinez Canillas <javier@osg.samsung.com>
CC: linux-media at vger.kernel.org
CC: linux-arm-kernel at lists.infradead.org
CC: linux-samsung-soc at vger.kernel.org
CC: linux-kernel at vger.kernel.org
---
drivers/media/platform/exynos4-is/fimc-is.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)
diff --git a/drivers/media/platform/exynos4-is/fimc-is.c b/drivers/media/platform/exynos4-is/fimc-is.c
index 7f92144..340d906 100644
--- a/drivers/media/platform/exynos4-is/fimc-is.c
+++ b/drivers/media/platform/exynos4-is/fimc-is.c
@@ -854,7 +854,7 @@ static int fimc_is_probe(struct platform_device *pdev)
vb2_dma_contig_set_max_seg_size(dev, DMA_BIT_MASK(32));
- ret = of_platform_populate(dev->of_node, NULL, NULL, dev);
+ ret = devm_of_platform_populate(dev);
if (ret < 0)
goto err_pm;
@@ -864,7 +864,7 @@ static int fimc_is_probe(struct platform_device *pdev)
*/
ret = fimc_is_register_subdevs(is);
if (ret < 0)
- goto err_of_dep;
+ goto err_pm;
ret = fimc_is_debugfs_create(is);
if (ret < 0)
@@ -883,8 +883,6 @@ static int fimc_is_probe(struct platform_device *pdev)
fimc_is_debugfs_remove(is);
err_sd:
fimc_is_unregister_subdevs(is);
-err_of_dep:
- of_platform_depopulate(dev);
err_pm:
if (!pm_runtime_enabled(dev))
fimc_is_runtime_suspend(dev);
@@ -946,7 +944,6 @@ static int fimc_is_remove(struct platform_device *pdev)
if (!pm_runtime_status_suspended(dev))
fimc_is_runtime_suspend(dev);
free_irq(is->irq, is);
- of_platform_depopulate(dev);
fimc_is_unregister_subdevs(is);
vb2_dma_contig_clear_max_seg_size(dev);
fimc_is_put_clocks(is);
--
1.9.1
prev parent reply other threads:[~2017-05-29 15:46 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 ` [PATCH 05/15] mfd: stm32-timers: use devm_of_platform_populate Benjamin Gaignard
2017-05-30 9:29 ` 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 ` Benjamin Gaignard [this message]
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-16-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).