Commit 93bbf6db authored by Ville Syrjälä's avatar Ville Syrjälä Committed by Dave Airlie

drm: Make drm_crtc_convert_{umode, to_umode} static and constify their params

drm_crtc_convert_umode() and drm_crtc_convert_to_umode() are never
used outside drm_crtc.c, so make them static. Also make the input
mode structure const for both functions.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent ac235daf
...@@ -1002,8 +1002,8 @@ EXPORT_SYMBOL(drm_mode_config_cleanup); ...@@ -1002,8 +1002,8 @@ EXPORT_SYMBOL(drm_mode_config_cleanup);
* Convert a drm_display_mode into a drm_mode_modeinfo structure to return to * Convert a drm_display_mode into a drm_mode_modeinfo structure to return to
* the user. * the user.
*/ */
void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out, static void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out,
struct drm_display_mode *in) const struct drm_display_mode *in)
{ {
WARN(in->hdisplay > USHRT_MAX || in->hsync_start > USHRT_MAX || WARN(in->hdisplay > USHRT_MAX || in->hsync_start > USHRT_MAX ||
in->hsync_end > USHRT_MAX || in->htotal > USHRT_MAX || in->hsync_end > USHRT_MAX || in->htotal > USHRT_MAX ||
...@@ -1044,8 +1044,8 @@ void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out, ...@@ -1044,8 +1044,8 @@ void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out,
* RETURNS: * RETURNS:
* Zero on success, errno on failure. * Zero on success, errno on failure.
*/ */
int drm_crtc_convert_umode(struct drm_display_mode *out, static int drm_crtc_convert_umode(struct drm_display_mode *out,
struct drm_mode_modeinfo *in) const struct drm_mode_modeinfo *in)
{ {
if (in->clock > INT_MAX || in->vrefresh > INT_MAX) if (in->clock > INT_MAX || in->vrefresh > INT_MAX)
return -ERANGE; return -ERANGE;
......
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