mirror of
https://github.com/torvalds/linux.git
synced 2025-11-02 09:40:27 +02:00
panel/samsung-s6e3ha2: Use refcounted allocation in place of devm_kzalloc()
Move to using the new API devm_drm_panel_alloc() to allocate the panel. Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org> Signed-off-by: Anusha Srivatsa <asrivats@redhat.com> Link: https://lore.kernel.org/r/20250529-b4-drm_panel_mass_driver_convert_part3-v2-17-5d75a3711e40@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
ae83372bc7
commit
b4ef743b23
1 changed files with 5 additions and 5 deletions
|
|
@ -681,9 +681,11 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
|
|||
struct s6e3ha2 *ctx;
|
||||
int ret;
|
||||
|
||||
ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
|
||||
if (!ctx)
|
||||
return -ENOMEM;
|
||||
ctx = devm_drm_panel_alloc(dev, struct s6e3ha2, panel,
|
||||
&s6e3ha2_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(ctx))
|
||||
return PTR_ERR(ctx);
|
||||
|
||||
mipi_dsi_set_drvdata(dsi, ctx);
|
||||
|
||||
|
|
@ -731,8 +733,6 @@ static int s6e3ha2_probe(struct mipi_dsi_device *dsi)
|
|||
ctx->bl_dev->props.brightness = S6E3HA2_DEFAULT_BRIGHTNESS;
|
||||
ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF;
|
||||
|
||||
drm_panel_init(&ctx->panel, dev, &s6e3ha2_drm_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
ctx->panel.prepare_prev_first = true;
|
||||
|
||||
drm_panel_add(&ctx->panel);
|
||||
|
|
|
|||
Loading…
Reference in a new issue