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/bridge: megachips-stdpxxxx-ge-b850v3-fw: convert to devm_drm_bridge_alloc() API

This is the new API for allocating DRM bridges.

Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Anusha Srivatsa <asrivats@redhat.com>
Link: https://lore.kernel.org/r/20250509-drm-bridge-convert-to-alloc-api-v3-5-b8bc1f16d7aa@bootlin.com
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>

+4 -7
+4 -7
drivers/gpu/drm/bridge/megachips-stdpxxxx-ge-b850v3-fw.c
··· 225 225 if (ge_b850v3_lvds_ptr) 226 226 goto success; 227 227 228 - ge_b850v3_lvds_ptr = devm_kzalloc(dev, 229 - sizeof(*ge_b850v3_lvds_ptr), 230 - GFP_KERNEL); 231 - 232 - if (!ge_b850v3_lvds_ptr) { 228 + ge_b850v3_lvds_ptr = devm_drm_bridge_alloc(dev, struct ge_b850v3_lvds, bridge, 229 + &ge_b850v3_lvds_funcs); 230 + if (IS_ERR(ge_b850v3_lvds_ptr)) { 233 231 mutex_unlock(&ge_b850v3_lvds_dev_mutex); 234 - return -ENOMEM; 232 + return PTR_ERR(ge_b850v3_lvds_ptr); 235 233 } 236 234 237 235 success: ··· 262 264 struct device *dev = &stdp4028_i2c->dev; 263 265 264 266 /* drm bridge initialization */ 265 - ge_b850v3_lvds_ptr->bridge.funcs = &ge_b850v3_lvds_funcs; 266 267 ge_b850v3_lvds_ptr->bridge.ops = DRM_BRIDGE_OP_DETECT | 267 268 DRM_BRIDGE_OP_EDID; 268 269 ge_b850v3_lvds_ptr->bridge.type = DRM_MODE_CONNECTOR_DisplayPort;