From: "José Expósito" <jose.exposito89@gmail.com>
To: laurent.pinchart@ideasonboard.com
Cc: kieran.bingham+renesas@ideasonboard.com, airlied@linux.ie,
daniel@ffwll.ch, maxime@cerno.tech,
dri-devel@lists.freedesktop.org,
linux-renesas-soc@vger.kernel.org, linux-kernel@vger.kernel.org,
"José Expósito" <jose.exposito89@gmail.com>
Subject: [PATCH] drm: rcar-du: switch to devm_drm_of_get_bridge
Date: Mon, 21 Feb 2022 08:37:57 +0100 [thread overview]
Message-ID: <20220221073757.12181-1-jose.exposito89@gmail.com> (raw)
The function "drm_of_find_panel_or_bridge" has been deprecated in
favor of "devm_drm_of_get_bridge".
Switch to the new function and reduce boilerplate.
Signed-off-by: José Expósito <jose.exposito89@gmail.com>
---
drivers/gpu/drm/rcar-du/rcar_lvds.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
index 72a272cfc11e..99b0febc56d1 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -712,18 +712,12 @@ static int rcar_lvds_parse_dt(struct rcar_lvds *lvds)
{
int ret;
- ret = drm_of_find_panel_or_bridge(lvds->dev->of_node, 1, 0,
- &lvds->panel, &lvds->next_bridge);
- if (ret)
+ lvds->next_bridge = devm_drm_of_get_bridge(lvds->dev,
+ lvds->dev->of_node,
+ 1, 0);
+ if (IS_ERR(lvds->next_bridge)) {
+ ret = -EINVAL;
goto done;
-
- if (lvds->panel) {
- lvds->next_bridge = devm_drm_panel_bridge_add(lvds->dev,
- lvds->panel);
- if (IS_ERR_OR_NULL(lvds->next_bridge)) {
- ret = -EINVAL;
- goto done;
- }
}
if (lvds->info->quirks & RCAR_LVDS_QUIRK_DUAL_LINK)
--
2.25.1
next reply other threads:[~2022-02-21 7:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-21 7:37 José Expósito [this message]
2022-02-21 8:56 ` Maxime Ripard
2022-02-21 12:15 ` Laurent Pinchart
2022-02-28 18:04 ` José Expósito
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=20220221073757.12181-1-jose.exposito89@gmail.com \
--to=jose.exposito89@gmail.com \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kieran.bingham+renesas@ideasonboard.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=maxime@cerno.tech \
/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
all inboxes | Powered by JetHome®