* [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge
@ 2022-02-21 7:28 José Expósito
2022-02-21 8:55 ` Maxime Ripard
0 siblings, 1 reply; 3+ messages in thread
From: José Expósito @ 2022-02-21 7:28 UTC (permalink / raw)
To: andrzej.hajda
Cc: narmstrong, robert.foss, Laurent.pinchart, jonas, jernej.skrabec,
airlied, daniel, maxime, dri-devel, linux-kernel,
José Expósito
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/bridge/analogix/anx7625.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c
index 2346dbcc505f..dfeb800751d5 100644
--- a/drivers/gpu/drm/bridge/analogix/anx7625.c
+++ b/drivers/gpu/drm/bridge/analogix/anx7625.c
@@ -1333,8 +1333,6 @@ static int anx7625_parse_dt(struct device *dev,
struct anx7625_platform_data *pdata)
{
struct device_node *np = dev->of_node, *ep0;
- struct drm_panel *panel;
- int ret;
int bus_type, mipi_lanes;
anx7625_get_swing_setting(dev, pdata);
@@ -1371,18 +1369,14 @@ static int anx7625_parse_dt(struct device *dev,
if (of_property_read_bool(np, "analogix,audio-enable"))
pdata->audio_en = 1;
- ret = drm_of_find_panel_or_bridge(np, 1, 0, &panel, NULL);
- if (ret < 0) {
- if (ret == -ENODEV)
+ pdata->panel_bridge = devm_drm_of_get_bridge(dev, np, 1, 0);
+ if (IS_ERR(pdata->panel_bridge)) {
+ if (PTR_ERR(pdata->panel_bridge) == -ENODEV)
return 0;
- return ret;
- }
- if (!panel)
- return -ENODEV;
- pdata->panel_bridge = devm_drm_panel_bridge_add(dev, panel);
- if (IS_ERR(pdata->panel_bridge))
return PTR_ERR(pdata->panel_bridge);
+ }
+
DRM_DEV_DEBUG_DRIVER(dev, "get panel node.\n");
return 0;
--
2.25.1
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge
2022-02-21 7:28 [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge José Expósito
@ 2022-02-21 8:55 ` Maxime Ripard
2022-03-09 14:55 ` Robert Foss
0 siblings, 1 reply; 3+ messages in thread
From: Maxime Ripard @ 2022-02-21 8:55 UTC (permalink / raw)
To: José Expósito
Cc: andrzej.hajda, narmstrong, robert.foss, Laurent.pinchart, jonas,
jernej.skrabec, airlied, daniel, dri-devel, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 353 bytes --]
On Mon, Feb 21, 2022 at 08:28:35AM +0100, José Expósito wrote:
> 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>
Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge
2022-02-21 8:55 ` Maxime Ripard
@ 2022-03-09 14:55 ` Robert Foss
0 siblings, 0 replies; 3+ messages in thread
From: Robert Foss @ 2022-03-09 14:55 UTC (permalink / raw)
To: Maxime Ripard
Cc: José Expósito, andrzej.hajda, narmstrong,
laurent.pinchart, jonas, jernej.skrabec, airlied, daniel,
dri-devel, linux-kernel
On Mon, 21 Feb 2022 at 09:55, Maxime Ripard <maxime@cerno.tech> wrote:
>
> On Mon, Feb 21, 2022 at 08:28:35AM +0100, José Expósito wrote:
> > 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>
>
> Reviewed-by: Maxime Ripard <maxime@cerno.tech>
Applied to drm-misc-next
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-03-09 14:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-21 7:28 [PATCH] drm/bridge: anx7625: switch to devm_drm_of_get_bridge José Expósito
2022-02-21 8:55 ` Maxime Ripard
2022-03-09 14:55 ` Robert Foss
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®