2
0
mirror of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git synced 2025-09-04 20:19:47 +08:00

Two more bridge conversions to devm_drm_bridge_alloc that address a

warning now reported by the bridge core code.
 -----BEGIN PGP SIGNATURE-----
 
 iJUEABMJAB0WIQTkHFbLp4ejekA/qfgnX84Zoj2+dgUCaIHYJwAKCRAnX84Zoj2+
 dvshAXoDY0O03PDFbmLM0wcVt9hlQKIeR3feXqeDM0wtBxfzKUGr/onSFsyR4EDg
 /fvvj84BgMBXhHHMGd684u4+IFnz51wGuxUjPXgmOG51je4CLMqXx2sel3Xrr8h0
 yPHYQ7PX5w==
 =WQro
 -----END PGP SIGNATURE-----

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 <airlied@redhat.com>

From: Maxime Ripard <mripard@redhat.com>
Link: https://lore.kernel.org/r/20250724-petite-gray-foxhound-b4fbb8@houat
This commit is contained in:
Dave Airlie 2025-07-29 16:52:49 +10:00
commit 711fa2667d
2 changed files with 11 additions and 7 deletions

View File

@ -90,14 +90,18 @@ int tidss_encoder_create(struct tidss_device *tidss,
struct drm_connector *connector;
int ret;
t_enc = drmm_simple_encoder_alloc(&tidss->ddev, struct tidss_encoder,
encoder, encoder_type);
t_enc = devm_drm_bridge_alloc(tidss->dev, struct tidss_encoder,
bridge, &tidss_bridge_funcs);
if (IS_ERR(t_enc))
return PTR_ERR(t_enc);
ret = drm_simple_encoder_init(&tidss->ddev, &t_enc->encoder,
encoder_type);
if (ret)
return ret;
t_enc->tidss = tidss;
t_enc->next_bridge = next_bridge;
t_enc->bridge.funcs = &tidss_bridge_funcs;
enc = &t_enc->encoder;
enc->possible_crtcs = possible_crtcs;

View File

@ -534,9 +534,10 @@ int tidss_oldi_init(struct tidss_device *tidss)
continue;
}
oldi = devm_kzalloc(tidss->dev, sizeof(*oldi), GFP_KERNEL);
if (!oldi) {
ret = -ENOMEM;
oldi = devm_drm_bridge_alloc(tidss->dev, struct tidss_oldi, bridge,
&tidss_oldi_bridge_funcs);
if (IS_ERR(oldi)) {
ret = PTR_ERR(oldi);
goto err_put_node;
}
@ -577,7 +578,6 @@ int tidss_oldi_init(struct tidss_device *tidss)
/* Register the bridge. */
oldi->bridge.of_node = child;
oldi->bridge.driver_private = oldi;
oldi->bridge.funcs = &tidss_oldi_bridge_funcs;
oldi->bridge.timings = &default_tidss_oldi_timings;
tidss->oldis[tidss->num_oldis++] = oldi;