drm/i915: Don't cast away const
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 7 Mar 2024 15:18:08 +0000 (17:18 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 15 Mar 2024 08:53:25 +0000 (10:53 +0200)
The connector state passed to .atomic_get_property() is const.
We should preserve that when downcasting to our version.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240307151810.24208-3-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
drivers/gpu/drm/i915/display/intel_atomic.c

index 2bb270f82932eba551e66fa2e264c06e9c01808b..7a77ae3dc394a77a00102bbd414e617e2def07da 100644 (file)
@@ -62,7 +62,7 @@ int intel_digital_connector_atomic_get_property(struct drm_connector *connector,
 {
        struct drm_device *dev = connector->dev;
        struct drm_i915_private *dev_priv = to_i915(dev);
-       struct intel_digital_connector_state *intel_conn_state =
+       const struct intel_digital_connector_state *intel_conn_state =
                to_intel_digital_connector_state(state);
 
        if (property == dev_priv->display.properties.force_audio)