mirror of
https://github.com/torvalds/linux.git
synced 2026-05-30 18:13:41 +02:00
panel/bf060y8m-aj0: 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-5-cdd7615e1f93@redhat.com Signed-off-by: Maxime Ripard <mripard@kernel.org>
This commit is contained in:
parent
9d7d7c3c9a
commit
4160530100
|
|
@ -350,9 +350,11 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
|
|||
struct boe_bf060y8m_aj0 *boe;
|
||||
int ret;
|
||||
|
||||
boe = devm_kzalloc(dev, sizeof(*boe), GFP_KERNEL);
|
||||
if (!boe)
|
||||
return -ENOMEM;
|
||||
boe = devm_drm_panel_alloc(dev, struct boe_bf060y8m_aj0, panel,
|
||||
&boe_bf060y8m_aj0_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
if (IS_ERR(boe))
|
||||
return PTR_ERR(boe);
|
||||
|
||||
ret = boe_bf060y8m_aj0_init_vregs(boe, dev);
|
||||
if (ret)
|
||||
|
|
@ -374,9 +376,6 @@ static int boe_bf060y8m_aj0_probe(struct mipi_dsi_device *dsi)
|
|||
MIPI_DSI_CLOCK_NON_CONTINUOUS |
|
||||
MIPI_DSI_MODE_LPM;
|
||||
|
||||
drm_panel_init(&boe->panel, dev, &boe_bf060y8m_aj0_panel_funcs,
|
||||
DRM_MODE_CONNECTOR_DSI);
|
||||
|
||||
boe->panel.prepare_prev_first = true;
|
||||
|
||||
boe->panel.backlight = boe_bf060y8m_aj0_create_backlight(dsi);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user