[PATCH 5/8] drm/msm: Use drm_for_each_connector_encoder_ids()

Ville Syrjala ville.syrjala at linux.intel.com
Tue Jun 26 17:47:11 UTC 2018


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Use drm_for_each_connector_encoder_ids() for iterating
connector->encoder_ids[]. A bit more convenient not having
to deal with the implementation details.

Cc: Rob Clark <robdclark at gmail.com>
Cc: linux-arm-msm at vger.kernel.org
Cc: freedreno at lists.freedesktop.org
Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 drivers/gpu/drm/msm/dsi/dsi_manager.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/msm/dsi/dsi_manager.c b/drivers/gpu/drm/msm/dsi/dsi_manager.c
index 4cb1cb68878b..26337be9a1ec 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_manager.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_manager.c
@@ -751,10 +751,11 @@ struct drm_connector *msm_dsi_manager_ext_bridge_init(u8 id)
 	connector_list = &dev->mode_config.connector_list;
 
 	list_for_each_entry(connector, connector_list, head) {
+		u32 encoder_id;
 		int i;
 
-		for (i = 0; i < DRM_CONNECTOR_MAX_ENCODER; i++) {
-			if (connector->encoder_ids[i] == encoder->base.id)
+		drm_for_each_connector_encoder_ids(connector, encoder_id, i) {
+			if (encoder_id == encoder->base.id)
 				return connector;
 		}
 	}
-- 
2.16.4



More information about the dri-devel mailing list