diff mbox series

[4/4] drm/dp_mst: Use DP_MST_LOGICAL_PORT_0 instead of magic number

Message ID 20210201120145.350258-4-imre.deak@intel.com (mailing list archive)
State New, archived
Headers show
Series [1/4] drm/dp_mst: Don't report ports connected if nothing is attached to them | expand

Commit Message

Imre Deak Feb. 1, 2021, 12:01 p.m. UTC
Use the macro defined for the first logical port instead of the
corresponding magic number.

Cc: Lyude Paul <lyude@redhat.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/drm_dp_mst_topology.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_dp_mst_topology.c b/drivers/gpu/drm/drm_dp_mst_topology.c
index 43a40660136c..0a54506c2773 100644
--- a/drivers/gpu/drm/drm_dp_mst_topology.c
+++ b/drivers/gpu/drm/drm_dp_mst_topology.c
@@ -4232,9 +4232,8 @@  drm_dp_mst_detect_port(struct drm_connector *connector,
 	case DP_PEER_DEVICE_SST_SINK:
 		ret = connector_status_connected;
 		/* for logical ports - cache the EDID */
-		if (port->port_num >= 8 && !port->cached_edid) {
+		if (port->port_num >= DP_MST_LOGICAL_PORT_0 && !port->cached_edid)
 			port->cached_edid = drm_get_edid(connector, &port->aux.ddc);
-		}
 		break;
 	case DP_PEER_DEVICE_DP_LEGACY_CONV:
 		if (port->ldps)