Originally we started storing pointers to the drm_dp_mst_port struct for
each intel_connector as void* to stop people from trying to dereference
them. Now that we've removed the public struct definition for
drm_dp_mst_port however, it's no longer possible to dereference the port
structure even when using the proper type. So, move back to struct
drm_dp_mst_port from void* for clarity.

Signed-off-by: Lyude Paul <ly...@redhat.com>
---
 drivers/gpu/drm/i915/intel_dp_mst.c | 2 +-
 drivers/gpu/drm/i915/intel_drv.h    | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c 
b/drivers/gpu/drm/i915/intel_dp_mst.c
index 4de247ddf05f..3408efe67694 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -39,7 +39,7 @@ static bool intel_dp_mst_compute_config(struct intel_encoder 
*encoder,
        struct intel_digital_port *intel_dig_port = intel_mst->primary;
        struct intel_dp *intel_dp = &intel_dig_port->dp;
        struct drm_connector *connector = conn_state->connector;
-       void *port = to_intel_connector(connector)->port;
+       struct drm_dp_mst_port *port = to_intel_connector(connector)->port;
        struct drm_atomic_state *state = pipe_config->base.state;
        int bpp;
        int lane_count, slots = 0;
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f575ba2a59da..1bb69097d6cb 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -415,7 +415,7 @@ struct intel_connector {
           state of connector->polled in case hotplug storm detection changes 
it */
        u8 polled;
 
-       void *port; /* store this opaque as its illegal to dereference it */
+       struct drm_dp_mst_port *port;
 
        struct intel_dp *mst_port;
 
-- 
2.19.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to