[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250402-b4-drm_panel_mass_convert_part2-v1-5-903b70999ea6@redhat.com>
Date: Wed, 02 Apr 2025 11:23:43 -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 05/30] panel/himax-hx8394: 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>
---
drivers/gpu/drm/panel/panel-himax-hx8394.c | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
index ff994bf0e3cc1af134f40ac3b1712633ae801caf..0e3bf4ba91890e5a859288cb6a9737ed77a343b3 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -611,9 +611,11 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
struct hx8394 *ctx;
int ret;
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(dev, struct hx8394, panel,
+ &hx8394_drm_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
ctx->reset_gpio = devm_gpiod_get_optional(dev, "reset", GPIOD_OUT_HIGH);
if (IS_ERR(ctx->reset_gpio))
@@ -645,9 +647,6 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->iovcc),
"Failed to request iovcc regulator\n");
- drm_panel_init(&ctx->panel, dev, &hx8394_drm_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