drm: Constify drm_color_lut_check()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 Jan 2019 17:06:09 +0000 (19:06 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 29 Jan 2019 21:26:12 +0000 (23:26 +0200)
drm_color_lut_check() doens't modify the passed in blob so
let's make it const.

Also s/uint32_t/u32/ while at it.

v2: Reduce line wraps (Sam)

Cc: Matt Roper <matthew.d.roper@intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20190129170609.5718-1-ville.syrjala@linux.intel.com
Reviewed-by: Sam Ravnborg <sam@ravnborg.org>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_color_mgmt.c
include/drm/drm_color_mgmt.h

index 968ca7c91ad8489990d9d6e9502ae816680bc594..d5d34d0c79c757fd594cd7755863e07a407e4e8f 100644 (file)
@@ -474,10 +474,9 @@ EXPORT_SYMBOL(drm_plane_create_color_properties);
  *
  * Returns 0 on success, -EINVAL on failure.
  */
-int drm_color_lut_check(struct drm_property_blob *lut,
-                       uint32_t tests)
+int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests)
 {
-       struct drm_color_lut *entry;
+       const struct drm_color_lut *entry;
        int i;
 
        if (!lut || !tests)
index 6affbda6d9cb114cd8f0ff58e62a1ae70d9f3067..d1c662d92ab7118b661a42cd78fe392a78d33f0c 100644 (file)
@@ -96,6 +96,5 @@ enum drm_color_lut_tests {
        DRM_COLOR_LUT_NON_DECREASING = BIT(1),
 };
 
-int drm_color_lut_check(struct drm_property_blob *lut,
-                       uint32_t tests);
+int drm_color_lut_check(const struct drm_property_blob *lut, u32 tests);
 #endif