Skip to content

Commit b213eb3

Browse files
jayesh-titomba
authored andcommitted
drm/tidss: oldi: convert to devm_drm_bridge_alloc() API
DRM bridges now use "devm_drm_bridge_alloc()" for allocation and initialization. "devm_kzalloc()" is not allowed anymore and it results in WARNING. So convert it. Fixes: 7246e09 ("drm/tidss: Add OLDI bridge support") Reviewed-by: Devarsh Thakkar <[email protected]> Reviewed-by: Aradhya Bhatia <[email protected]> Signed-off-by: Jayesh Choudhary <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Tomi Valkeinen <[email protected]>
1 parent 66cdf05 commit b213eb3

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/gpu/drm/tidss/tidss_oldi.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -534,9 +534,10 @@ int tidss_oldi_init(struct tidss_device *tidss)
534534
continue;
535535
}
536536

537-
oldi = devm_kzalloc(tidss->dev, sizeof(*oldi), GFP_KERNEL);
538-
if (!oldi) {
539-
ret = -ENOMEM;
537+
oldi = devm_drm_bridge_alloc(tidss->dev, struct tidss_oldi, bridge,
538+
&tidss_oldi_bridge_funcs);
539+
if (IS_ERR(oldi)) {
540+
ret = PTR_ERR(oldi);
540541
goto err_put_node;
541542
}
542543

@@ -577,7 +578,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
577578
/* Register the bridge. */
578579
oldi->bridge.of_node = child;
579580
oldi->bridge.driver_private = oldi;
580-
oldi->bridge.funcs = &tidss_oldi_bridge_funcs;
581581
oldi->bridge.timings = &default_tidss_oldi_timings;
582582

583583
tidss->oldis[tidss->num_oldis++] = oldi;

0 commit comments

Comments
 (0)