drm/core: Change declaration for gamma_set.
[linux-2.6-microblaze.git] / drivers / gpu / drm / mgag200 / mgag200_mode.c
index 14e64e0..f6d5892 100644 (file)
@@ -1344,19 +1344,20 @@ static void mga_crtc_commit(struct drm_crtc *crtc)
  * use this for 8-bit mode so can't perform smooth fades on deeper modes,
  * but it's a requirement that we provide the function
  */
-static void mga_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
-                                 u16 *blue, uint32_t start, uint32_t size)
+static int mga_crtc_gamma_set(struct drm_crtc *crtc, u16 *red, u16 *green,
+                             u16 *blue, uint32_t size)
 {
        struct mga_crtc *mga_crtc = to_mga_crtc(crtc);
-       int end = (start + size > MGAG200_LUT_SIZE) ? MGAG200_LUT_SIZE : start + size;
        int i;
 
-       for (i = start; i < end; i++) {
+       for (i = 0; i < size; i++) {
                mga_crtc->lut_r[i] = red[i] >> 8;
                mga_crtc->lut_g[i] = green[i] >> 8;
                mga_crtc->lut_b[i] = blue[i] >> 8;
        }
        mga_crtc_load_lut(crtc);
+
+       return 0;
 }
 
 /* Simple cleanup function */