aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2012-03-13 06:35:47 -0400
committerDave Airlie <airlied@redhat.com>2012-03-15 05:52:02 -0400
commit93bbf6dbdadbb47ef5a19aecf45669c01ee8830d (patch)
tree2b6dbb0f3ab306dbf1284d9cd57b7839265c8726 /drivers/gpu
parentac235dafb60d3ba4fa4e7341503b16d6e0645ee7 (diff)
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: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/drm_crtc.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 37d34ad3a0b8..e36bd43aaa14 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -1002,8 +1002,8 @@ EXPORT_SYMBOL(drm_mode_config_cleanup);
1002 * Convert a drm_display_mode into a drm_mode_modeinfo structure to return to 1002 * Convert a drm_display_mode into a drm_mode_modeinfo structure to return to
1003 * the user. 1003 * the user.
1004 */ 1004 */
1005void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out, 1005static void drm_crtc_convert_to_umode(struct drm_mode_modeinfo *out,
1006 struct drm_display_mode *in) 1006 const struct drm_display_mode *in)
1007{ 1007{
1008 WARN(in->hdisplay > USHRT_MAX || in->hsync_start > USHRT_MAX || 1008 WARN(in->hdisplay > USHRT_MAX || in->hsync_start > USHRT_MAX ||
1009 in->hsync_end > USHRT_MAX || in->htotal > USHRT_MAX || 1009 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 * RETURNS: 1044 * RETURNS:
1045 * Zero on success, errno on failure. 1045 * Zero on success, errno on failure.
1046 */ 1046 */
1047int drm_crtc_convert_umode(struct drm_display_mode *out, 1047static int drm_crtc_convert_umode(struct drm_display_mode *out,
1048 struct drm_mode_modeinfo *in) 1048 const struct drm_mode_modeinfo *in)
1049{ 1049{
1050 if (in->clock > INT_MAX || in->vrefresh > INT_MAX) 1050 if (in->clock > INT_MAX || in->vrefresh > INT_MAX)
1051 return -ERANGE; 1051 return -ERANGE;