Commit 0b3904ab authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie

drm: Constify some function arguments

None of drm_mode_debug_printmodeline(), drm_mode_equal(), drm_mode_width()
or drm_mode_height() change the mode passed in, so make the arguments
const.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent b180b5d1
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
* *
* Describe @mode using DRM_DEBUG. * Describe @mode using DRM_DEBUG.
*/ */
void drm_mode_debug_printmodeline(struct drm_display_mode *mode) void drm_mode_debug_printmodeline(const struct drm_display_mode *mode)
{ {
DRM_DEBUG_KMS("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d " DRM_DEBUG_KMS("Modeline %d:\"%s\" %d %d %d %d %d %d %d %d %d %d "
"0x%x 0x%x\n", "0x%x 0x%x\n",
...@@ -558,7 +558,7 @@ EXPORT_SYMBOL(drm_mode_list_concat); ...@@ -558,7 +558,7 @@ EXPORT_SYMBOL(drm_mode_list_concat);
* RETURNS: * RETURNS:
* @mode->hdisplay * @mode->hdisplay
*/ */
int drm_mode_width(struct drm_display_mode *mode) int drm_mode_width(const struct drm_display_mode *mode)
{ {
return mode->hdisplay; return mode->hdisplay;
...@@ -579,7 +579,7 @@ EXPORT_SYMBOL(drm_mode_width); ...@@ -579,7 +579,7 @@ EXPORT_SYMBOL(drm_mode_width);
* RETURNS: * RETURNS:
* @mode->vdisplay * @mode->vdisplay
*/ */
int drm_mode_height(struct drm_display_mode *mode) int drm_mode_height(const struct drm_display_mode *mode)
{ {
return mode->vdisplay; return mode->vdisplay;
} }
...@@ -768,7 +768,7 @@ EXPORT_SYMBOL(drm_mode_duplicate); ...@@ -768,7 +768,7 @@ EXPORT_SYMBOL(drm_mode_duplicate);
* RETURNS: * RETURNS:
* True if the modes are equal, false otherwise. * 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 /* do clock check convert to PICOS so fb modes get matched
* the same */ * the same */
......
...@@ -887,14 +887,14 @@ extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_ ...@@ -887,14 +887,14 @@ extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_
extern void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src); extern void drm_mode_copy(struct drm_display_mode *dst, const struct drm_display_mode *src);
extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev,
const struct drm_display_mode *mode); const struct drm_display_mode *mode);
extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); extern void drm_mode_debug_printmodeline(const struct drm_display_mode *mode);
extern void drm_mode_config_init(struct drm_device *dev); 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_reset(struct drm_device *dev);
extern void drm_mode_config_cleanup(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 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_width(const struct drm_display_mode *mode);
extern int drm_mode_height(struct drm_display_mode *mode); extern int drm_mode_height(const struct drm_display_mode *mode);
/* for us by fb module */ /* for us by fb module */
extern int drm_mode_attachmode_crtc(struct drm_device *dev, extern int drm_mode_attachmode_crtc(struct drm_device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment