[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250403-b4-drm_panel_mass_convert_part2-v2-23-260c8a44c56b@redhat.com>
Date: Thu, 03 Apr 2025 10:16:30 -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 23/30] panel/novatek-nt35510: 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-novatek-nt35510.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-novatek-nt35510.c b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
index 549b86f2cc288741897992ce5cad6325f4289dba..3189d89c7ca00074314a6f4fec330a3e625c24f4 100644
--- a/drivers/gpu/drm/panel/panel-novatek-nt35510.c
+++ b/drivers/gpu/drm/panel/panel-novatek-nt35510.c
@@ -1087,9 +1087,12 @@ static int nt35510_probe(struct mipi_dsi_device *dsi)
struct nt35510 *nt;
int ret;
- nt = devm_kzalloc(dev, sizeof(struct nt35510), GFP_KERNEL);
- if (!nt)
- return -ENOMEM;
+ nt = devm_drm_panel_alloc(dev, struct nt35510, panel,
+ &nt35510_drm_funcs,
+ DRM_MODE_CONNECTOR_DSI);
+ if (IS_ERR(nt))
+ return PTR_ERR(nt);
+
mipi_dsi_set_drvdata(dsi, nt);
nt->dev = dev;
@@ -1142,9 +1145,6 @@ static int nt35510_probe(struct mipi_dsi_device *dsi)
return PTR_ERR(nt->reset_gpio);
}
- drm_panel_init(&nt->panel, dev, &nt35510_drm_funcs,
- DRM_MODE_CONNECTOR_DSI);
-
/*
* First, try to locate an external backlight (such as on GPIO)
* if this fails, assume we will want to use the internal backlight
--
2.48.1
Powered by blists - more mailing lists