[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250403-b4-drm_panel_mass_convert_part2-v2-14-260c8a44c56b@redhat.com>
Date: Thu, 03 Apr 2025 10:16:21 -0400
From: Anusha Srivatsa <asrivats@...hat.com>
To: Neil Armstrong <neil.armstrong@...aro.org>,
Jessica Zhang <quic_jesszhan@...cinc.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Icenowy Zheng <icenowy@...c.io>, Jagan Teki <jagan@...rulasolutions.com>,
Ondrej Jirman <megi@....cz>, Javier Martinez Canillas <javierm@...hat.com>,
Michael Trimarchi <michael@...rulasolutions.com>,
Michael Walle <mwalle@...nel.org>, Jagan Teki <jagan@...eble.ai>,
Guido Günther <agx@...xcpu.org>,
Purism Kernel Team <kernel@...i.sm>,
Linus Walleij <linus.walleij@...aro.org>,
Jianhua Lu <lujianhua000@...il.com>, Stefan Mavrodiev <stefan@...mex.com>
Cc: dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org,
Anusha Srivatsa <asrivats@...hat.com>
Subject: [PATCH v2 14/30] panel/jdi-fhd-r63452: Use refcounted allocation
in place of devm_kzalloc()
Move to using the new API devm_drm_panel_alloc() to allocate the
panel.
Signed-off-by: Anusha Srivatsa <asrivats@...hat.com>
---
v2: none.
---
drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
index 4eb71e85e9e9f2acaa2bdc23dae563f04da64f8c..cbe354b51bce35ec07b6f0758973fd5dffd92c42 100644
--- a/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
+++ b/drivers/gpu/drm/panel/panel-jdi-fhd-r63452.c
@@ -175,9 +175,11 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi)
struct jdi_fhd_r63452 *ctx;
int ret;
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(dev, struct jdi_fhd_r63452, panel,
+ &jdi_fhd_r63452_panel_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
ctx->reset_gpio = devm_gpiod_get(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->reset_gpio))
@@ -192,8 +194,6 @@ static int jdi_fhd_r63452_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_CLOCK_NON_CONTINUOUS;
- drm_panel_init(&ctx->panel, dev, &jdi_fhd_r63452_panel_funcs,
- DRM_MODE_CONNECTOR_DSI);
ctx->panel.prepare_prev_first = true;
ret = drm_panel_of_backlight(&ctx->panel);
--
2.48.1
Powered by blists - more mailing lists