drm: Make some modes const when iterating through them
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 7 Sep 2015 15:22:56 +0000 (18:22 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 9 Sep 2015 12:53:39 +0000 (14:53 +0200)
valid_inferred_mode() don't change the modes over which it iterates,
so make the iterator const.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_edid.c

index 05bb7311ac5d151a1893b3802e333f28c8707df4..9afb1fc15b34a0e057d17e2f9b2b19f7e872d836 100644 (file)
@@ -2044,7 +2044,7 @@ mode_in_range(const struct drm_display_mode *mode, struct edid *edid,
 static bool valid_inferred_mode(const struct drm_connector *connector,
                                const struct drm_display_mode *mode)
 {
-       struct drm_display_mode *m;
+       const struct drm_display_mode *m;
        bool ok = false;
 
        list_for_each_entry(m, &connector->probed_modes, head) {