From: Laurent Pinchart Date: Tue, 5 Jun 2018 00:36:13 +0000 (+0300) Subject: drm/atomic: Constify mode argument to mode_valid_path() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8518f05a7110c9f4d70835385fd2474ff479113a;p=linux.git drm/atomic: Constify mode argument to mode_valid_path() The mode_valid_path() function validates the mode it receives without ever modifying it. Constify the mode pointer argument to make that explicit. Signed-off-by: Laurent Pinchart Reviewed-by: Ville Syrjälä Signed-off-by: Tomi Valkeinen --- diff --git a/drivers/gpu/drm/drm_atomic_helper.c b/drivers/gpu/drm/drm_atomic_helper.c index 40ac198480345..3b7eb58817f01 100644 --- a/drivers/gpu/drm/drm_atomic_helper.c +++ b/drivers/gpu/drm/drm_atomic_helper.c @@ -495,7 +495,7 @@ mode_fixup(struct drm_atomic_state *state) static enum drm_mode_status mode_valid_path(struct drm_connector *connector, struct drm_encoder *encoder, struct drm_crtc *crtc, - struct drm_display_mode *mode) + const struct drm_display_mode *mode) { enum drm_mode_status ret; @@ -534,7 +534,7 @@ mode_valid(struct drm_atomic_state *state) struct drm_crtc *crtc = conn_state->crtc; struct drm_crtc_state *crtc_state; enum drm_mode_status mode_status; - struct drm_display_mode *mode; + const struct drm_display_mode *mode; if (!crtc || !encoder) continue;