CHROMIUM: drm: constify drm_mode_equal args
authorOlof Johansson <olofj@chromium.org>
Mon, 10 Sep 2012 17:16:09 +0000 (10:16 -0700)
committerGerrit <chrome-bot@google.com>
Tue, 11 Sep 2012 00:27:47 +0000 (17:27 -0700)
Resolves:

drivers/gpu/drm/drm_edid.c:1462:3: warning: passing argument 2 of ‘drm_mode_equal’ discards ‘const’ qualifier from pointer target type [enabled by default]

BUG=chromium-os:34287
TEST=none

Change-Id: I1f4041b85bb3f2c40fd5654350e3a25423f9b8a1
Signed-off-by: Olof Johansson <olofj@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/32835
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
drivers/gpu/drm/drm_modes.c
include/drm/drm_crtc.h

index b7adb4a..ac4e1fa 100644 (file)
@@ -772,7 +772,8 @@ EXPORT_SYMBOL(drm_mode_duplicate);
  * RETURNS:
  * True if the modes are equal, false otherwise.
  */
-bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2)
+bool drm_mode_equal(const struct drm_display_mode *mode1,
+                   const struct drm_display_mode *mode2)
 {
        /* do clock check convert to PICOS so fb modes get matched
         * the same */
index f52686f..f1a0764 100644 (file)
@@ -865,7 +865,7 @@ extern void drm_mode_config_init(struct drm_device *dev);
 extern void drm_mode_config_reset(struct drm_device *dev);
 extern void drm_mode_config_cleanup(struct drm_device *dev);
 extern void drm_mode_set_name(struct drm_display_mode *mode);
-extern bool drm_mode_equal(struct drm_display_mode *mode1, struct drm_display_mode *mode2);
+extern bool drm_mode_equal(const struct drm_display_mode *mode1, const struct drm_display_mode *mode2);
 extern int drm_mode_width(struct drm_display_mode *mode);
 extern int drm_mode_height(struct drm_display_mode *mode);