[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250403-b4-drm_panel_mass_convert_part2-v2-16-260c8a44c56b@redhat.com>
Date: Thu, 03 Apr 2025 10:16:23 -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 16/30] panel/ltk500hd1829: 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-leadtek-ltk500hd1829.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
index 6b18cf00fd4a7a1d12a3577eced49ad6f9c3e955..7f19fd5b80600c2db3236f2d0e3ee44fd91fe4f9 100644
--- a/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
+++ b/drivers/gpu/drm/panel/panel-leadtek-ltk500hd1829.c
@@ -604,9 +604,11 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi)
struct device *dev = &dsi->dev;
int ret;
- ctx = devm_kzalloc(&dsi->dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(dev, struct ltk500hd1829, panel,
+ <k500hd1829_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
ctx->panel_desc = of_device_get_match_data(dev);
if (!ctx->panel_desc)
@@ -643,9 +645,6 @@ static int ltk500hd1829_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_LPM | MIPI_DSI_MODE_NO_EOT_PACKET;
- drm_panel_init(&ctx->panel, &dsi->dev, <k500hd1829_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
return ret;
--
2.48.1
Powered by blists - more mailing lists