xf86drmMode: constify drmModeCrtcSetGamma
authorXaver Hugl <xaver.hugl@gmail.com>
Fri, 7 Apr 2023 23:42:17 +0000 (01:42 +0200)
committerSimon Ser <contact@emersion.fr>
Thu, 20 Jul 2023 11:01:48 +0000 (11:01 +0000)
The data is never modified, so it should be const

Signed-off-by: Xaver Hugl <xaver.hugl@gmail.com>
xf86drmMode.c
xf86drmMode.h

index 22a8a7c..65d54d7 100644 (file)
@@ -1004,8 +1004,8 @@ drm_public int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
 }
 
 drm_public int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size,
-                                                                  uint16_t *red, uint16_t *green,
-                                                                  uint16_t *blue)
+                                                                  const uint16_t *red, const uint16_t *green,
+                                                                  const uint16_t *blue)
 {
        struct drm_mode_crtc_lut l;
 
index d911c9a..b6410ab 100644 (file)
@@ -416,7 +416,7 @@ extern int drmModeConnectorSetProperty(int fd, uint32_t connector_id, uint32_t p
 extern int drmCheckModesettingSupported(const char *busid);
 
 extern int drmModeCrtcSetGamma(int fd, uint32_t crtc_id, uint32_t size,
-                              uint16_t *red, uint16_t *green, uint16_t *blue);
+                              const uint16_t *red, const uint16_t *green, const uint16_t *blue);
 extern int drmModeCrtcGetGamma(int fd, uint32_t crtc_id, uint32_t size,
                               uint16_t *red, uint16_t *green, uint16_t *blue);
 extern int drmModePageFlip(int fd, uint32_t crtc_id, uint32_t fb_id,