Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/panel/boe-himax8279d: Use refcounted allocation in place of devm_kzalloc()

Move to using the new API devm_drm_panel_alloc() to allocate the
panel. In the call to the new API, avoid using explicit type and use
__typeof() for more type safety.

Signed-off-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250710-b4-driver-convert-last-part-july-v1-14-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
d27da679 51929b68

+5 -6
+5 -6
drivers/gpu/drm/panel/panel-boe-himax8279d.c
··· 847 847 "failed to get enable gpio\n"); 848 848 } 849 849 850 - drm_panel_init(&pinfo->base, dev, &panel_funcs, 851 - DRM_MODE_CONNECTOR_DSI); 852 - 853 850 ret = drm_panel_of_backlight(&pinfo->base); 854 851 if (ret) 855 852 return ret; ··· 862 865 const struct panel_desc *desc; 863 866 int err; 864 867 865 - pinfo = devm_kzalloc(&dsi->dev, sizeof(*pinfo), GFP_KERNEL); 866 - if (!pinfo) 867 - return -ENOMEM; 868 + pinfo = devm_drm_panel_alloc(&dsi->dev, __typeof(*pinfo), base, 869 + &panel_funcs, DRM_MODE_CONNECTOR_DSI); 870 + 871 + if (IS_ERR(pinfo)) 872 + return PTR_ERR(pinfo); 868 873 869 874 desc = of_device_get_match_data(&dsi->dev); 870 875 dsi->mode_flags = desc->mode_flags;