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-tv101wum-nl6: 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-13-de73ba81b2f5@redhat.com
Signed-off-by: Maxime Ripard <mripard@kernel.org>

authored by

Anusha Srivatsa and committed by
Maxime Ripard
51929b68 46c8779b

+5 -5
+5 -5
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
··· 1720 1720 1721 1721 boe->base.prepare_prev_first = true; 1722 1722 1723 - drm_panel_init(&boe->base, dev, &boe_panel_funcs, 1724 - DRM_MODE_CONNECTOR_DSI); 1725 1723 err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation); 1726 1724 if (err < 0) { 1727 1725 dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, err); ··· 1744 1746 int ret; 1745 1747 const struct panel_desc *desc; 1746 1748 1747 - boe = devm_kzalloc(&dsi->dev, sizeof(*boe), GFP_KERNEL); 1748 - if (!boe) 1749 - return -ENOMEM; 1749 + boe = devm_drm_panel_alloc(&dsi->dev, __typeof(*boe), base, 1750 + &boe_panel_funcs, DRM_MODE_CONNECTOR_DSI); 1751 + 1752 + if (IS_ERR(boe)) 1753 + return PTR_ERR(boe); 1750 1754 1751 1755 desc = of_device_get_match_data(&dsi->dev); 1752 1756 dsi->lanes = desc->lanes;