Skip to content

Commit 711fa26

Browse files
committed
Merge tag 'drm-misc-next-fixes-2025-07-24' of https://gitlab.freedesktop.org/drm/misc/kernel into drm-next
Two more bridge conversions to devm_drm_bridge_alloc that address a warning now reported by the bridge core code. Signed-off-by: Dave Airlie <[email protected]> From: Maxime Ripard <[email protected]> Link: https://lore.kernel.org/r/20250724-petite-gray-foxhound-b4fbb8@houat
2 parents ba0f4c4 + b213eb3 commit 711fa26

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

drivers/gpu/drm/tidss/tidss_encoder.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,14 +90,18 @@ int tidss_encoder_create(struct tidss_device *tidss,
9090
struct drm_connector *connector;
9191
int ret;
9292

93-
t_enc = drmm_simple_encoder_alloc(&tidss->ddev, struct tidss_encoder,
94-
encoder, encoder_type);
93+
t_enc = devm_drm_bridge_alloc(tidss->dev, struct tidss_encoder,
94+
bridge, &tidss_bridge_funcs);
9595
if (IS_ERR(t_enc))
9696
return PTR_ERR(t_enc);
9797

98+
ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder,
99+
encoder_type);
100+
if (ret)
101+
return ret;
102+
98103
t_enc->tidss = tidss;
99104
t_enc->next_bridge = next_bridge;
100-
t_enc->bridge.funcs = &tidss_bridge_funcs;
101105

102106
enc = &t_enc->encoder;
103107
enc->possible_crtcs = possible_crtcs;

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)