mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
drm/omap: use drm_for_each_bridge_in_chain_from()
Use drm_for_each_bridge_in_chain_from _scoped() instead of an open-coded loop based on drm_bridge_get_next_bridge() to ensure the bridge being looped on is refcounted and simplify the driver code. Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://lore.kernel.org/r/20250808-drm-bridge-alloc-getput-for_each_bridge-v2-9-edb6ee81edf1@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
parent
78f4eec620
commit
8e1e17416c
|
|
@ -77,7 +77,6 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
|
|||
struct omap_dss_device *output = omap_encoder->output;
|
||||
struct drm_device *dev = encoder->dev;
|
||||
struct drm_connector *connector;
|
||||
struct drm_bridge *bridge;
|
||||
struct videomode vm = { 0 };
|
||||
u32 bus_flags;
|
||||
|
||||
|
|
@ -97,8 +96,7 @@ static void omap_encoder_mode_set(struct drm_encoder *encoder,
|
|||
*
|
||||
* A better solution is to use DRM's bus-flags through the whole driver.
|
||||
*/
|
||||
for (bridge = output->bridge; bridge;
|
||||
bridge = drm_bridge_get_next_bridge(bridge)) {
|
||||
drm_for_each_bridge_in_chain_from(output->bridge, bridge) {
|
||||
if (!bridge->timings)
|
||||
continue;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user