From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
To: robh+dt@kernel.org, frowand.list@gmail.com,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
vincent.abriou@st.com, dri-devel@lists.freedesktop.org
Cc: linaro-kernel@lists.linaro.org
Subject: [PATCH v1 2/2] drm: sti: make driver use devm_of_platform_populate()
Date: Fri, 17 Feb 2017 15:31:26 +0100 [thread overview]
Message-ID: <1487341886-13829-3-git-send-email-benjamin.gaignard@linaro.org> (raw)
In-Reply-To: <1487341886-13829-1-git-send-email-benjamin.gaignard@linaro.org>
This make sure that of_platform_depopulate() is called if an error
occur in probe after populating the date from the device tree.
Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
drivers/gpu/drm/sti/sti_drv.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/sti/sti_drv.c b/drivers/gpu/drm/sti/sti_drv.c
index ff71e25..01ef9a4 100644
--- a/drivers/gpu/drm/sti/sti_drv.c
+++ b/drivers/gpu/drm/sti/sti_drv.c
@@ -438,7 +438,7 @@ static int sti_platform_probe(struct platform_device *pdev)
dma_set_coherent_mask(dev, DMA_BIT_MASK(32));
- of_platform_populate(node, NULL, NULL, dev);
+ devm_of_platform_populate(dev, node, NULL, NULL, dev);
child_np = of_get_next_available_child(node, NULL);
@@ -454,7 +454,6 @@ static int sti_platform_probe(struct platform_device *pdev)
static int sti_platform_remove(struct platform_device *pdev)
{
component_master_del(&pdev->dev, &sti_ops);
- of_platform_depopulate(&pdev->dev);
return 0;
}
--
1.9.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
prev parent reply other threads:[~2017-02-17 14:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-17 14:31 [PATCH v1 0/2] Introduce devm_of_platform_populate() helper Benjamin Gaignard
2017-02-17 14:31 ` [PATCH v1 1/2] of: add devm_ functions for populate and depopulate Benjamin Gaignard
2017-02-24 14:17 ` Rob Herring
2017-02-24 15:13 ` Benjamin Gaignard
2017-02-24 15:20 ` Rob Herring
2017-02-24 15:26 ` Benjamin Gaignard
2017-02-24 15:30 ` Rob Herring
2017-02-17 14:31 ` 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=1487341886-13829-3-git-send-email-benjamin.gaignard@linaro.org \
--to=benjamin.gaignard@linaro.org \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=frowand.list@gmail.com \
--cc=linaro-kernel@lists.linaro.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=vincent.abriou@st.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).