mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 03:44:45 +01:00
drm/bridge: use drm_for_each_bridge_in_chain_scoped()
Use drm_for_each_bridge_in_chain_scoped() instead of drm_for_each_bridge_in_chain() to ensure the bridge being looped on is refcounted. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-6-edb6ee81edf1@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
a5821ed052
commit
bd57048e45
1 changed files with 1 additions and 2 deletions
|
|
@ -1480,10 +1480,9 @@ static int encoder_bridges_show(struct seq_file *m, void *data)
|
|||
{
|
||||
struct drm_encoder *encoder = m->private;
|
||||
struct drm_printer p = drm_seq_file_printer(m);
|
||||
struct drm_bridge *bridge;
|
||||
unsigned int idx = 0;
|
||||
|
||||
drm_for_each_bridge_in_chain(encoder, bridge)
|
||||
drm_for_each_bridge_in_chain_scoped(encoder, bridge)
|
||||
drm_bridge_debugfs_show_bridge(&p, bridge, idx++);
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue