panel/boe-tv101wum-ll2: 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@redhat.com>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20250401-b4-drm-panel-mass-driver-convert-v1-7-cdd7615e1f93@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
Anusha Srivatsa 2025-04-01 12:03:50 -04:00 committed by Maxime Ripard
parent 77dcbce637
commit 5d2b55e55e
No known key found for this signature in database
GPG key ID: 275FCE19A23DBE76

View file

@ -166,9 +166,11 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
struct boe_tv101wum_ll2 *ctx; struct boe_tv101wum_ll2 *ctx;
int ret; int ret;
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL); ctx = devm_drm_panel_alloc(dev, struct boe_tv101wum_ll2, panel,
if (!ctx) &boe_tv101wum_ll2_panel_funcs,
return -ENOMEM; DRM_MODE_CONNECTOR_DSI
if (IS_ERR(panel))
return PTR_ERR(panel);
ret = devm_regulator_bulk_get_const(&dsi->dev, ret = devm_regulator_bulk_get_const(&dsi->dev,
ARRAY_SIZE(boe_tv101wum_ll2_supplies), ARRAY_SIZE(boe_tv101wum_ll2_supplies),
@ -190,8 +192,6 @@ static int boe_tv101wum_ll2_probe(struct mipi_dsi_device *dsi)
dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST | dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_BURST |
MIPI_DSI_MODE_VIDEO_HSE; MIPI_DSI_MODE_VIDEO_HSE;
drm_panel_init(&ctx->panel, dev, &boe_tv101wum_ll2_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
ctx->panel.prepare_prev_first = true; ctx->panel.prepare_prev_first = true;
ret = drm_panel_of_backlight(&ctx->panel); ret = drm_panel_of_backlight(&ctx->panel);