drm/gma500: constify all struct drm_*_helper funcs pointers
authorJani Nikula <jani.nikula@intel.com>
Wed, 11 Mar 2015 09:51:01 +0000 (11:51 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 7 Apr 2015 15:06:41 +0000 (17:06 +0200)
They are not to be modified.

Generated using the semantic patch:

@@
@@
(
  const struct drm_crtc_helper_funcs *
|
- struct drm_crtc_helper_funcs *
+ const struct drm_crtc_helper_funcs *
)

@@
@@
(
  const struct drm_encoder_helper_funcs *
|
- struct drm_encoder_helper_funcs *
+ const struct drm_encoder_helper_funcs *
)

@@
@@
(
  const struct drm_connector_helper_funcs *
|
- struct drm_connector_helper_funcs *
+ const struct drm_connector_helper_funcs *
)

@@
@@
(
  const struct drm_plane_helper_funcs *
|
- struct drm_plane_helper_funcs *
+ const struct drm_plane_helper_funcs *
)

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/gma500/cdv_intel_display.c
drivers/gpu/drm/gma500/cdv_intel_hdmi.c
drivers/gpu/drm/gma500/cdv_intel_lvds.c
drivers/gpu/drm/gma500/gma_display.c
drivers/gpu/drm/gma500/mdfld_dsi_output.c
drivers/gpu/drm/gma500/mdfld_intel_display.c
drivers/gpu/drm/gma500/oaktrail_crtc.c
drivers/gpu/drm/gma500/oaktrail_hdmi.c
drivers/gpu/drm/gma500/psb_intel_display.c
drivers/gpu/drm/gma500/psb_intel_lvds.c

index 66727328832d7563f6e1dc42bc67ea6b48809ee2..7d47b3d5cc0d0be41258c71f4e81b3840be88a2d 100644 (file)
@@ -823,7 +823,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,
 
        /* Flush the plane changes */
        {
-               struct drm_crtc_helper_funcs *crtc_funcs =
+               const struct drm_crtc_helper_funcs *crtc_funcs =
                    crtc->helper_private;
                crtc_funcs->mode_set_base(crtc, x, y, old_fb);
        }
index 4268bf2100344167243ff9f7bbb20c0370658eb6..6b1d3340ba1439eb3491a08d3a15cf4dcf38dc2f 100644 (file)
@@ -195,7 +195,7 @@ static int cdv_hdmi_set_property(struct drm_connector *connector,
                                            encoder->crtc->x, encoder->crtc->y, encoder->crtc->primary->fb))
                                        return -1;
                        } else {
-                               struct drm_encoder_helper_funcs *helpers
+                               const struct drm_encoder_helper_funcs *helpers
                                                    = encoder->helper_private;
                                helpers->mode_set(encoder, &crtc->saved_mode,
                                             &crtc->saved_adjusted_mode);
index 0b770396548c6674c88d3b2802695b703189ae7b..211069b2b951733b39b510545ddb04c34ef3d4dc 100644 (file)
@@ -505,7 +505,7 @@ static int cdv_intel_lvds_set_property(struct drm_connector *connector,
                else
                         gma_backlight_set(encoder->dev, value);
        } else if (!strcmp(property->name, "DPMS") && encoder) {
-               struct drm_encoder_helper_funcs *helpers =
+               const struct drm_encoder_helper_funcs *helpers =
                                        encoder->helper_private;
                helpers->dpms(encoder, value);
        }
index 9bb9bddd881a701a4cf387bf31874455d7e9da76..001b450b27b320fd4fd90eba59fbe80544e25d94 100644 (file)
@@ -501,20 +501,20 @@ bool gma_crtc_mode_fixup(struct drm_crtc *crtc,
 
 void gma_crtc_prepare(struct drm_crtc *crtc)
 {
-       struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+       const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
        crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
 }
 
 void gma_crtc_commit(struct drm_crtc *crtc)
 {
-       struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+       const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
        crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);
 }
 
 void gma_crtc_disable(struct drm_crtc *crtc)
 {
        struct gtt_range *gt;
-       struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+       const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
 
        crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
 
@@ -656,7 +656,7 @@ void gma_crtc_restore(struct drm_crtc *crtc)
 
 void gma_encoder_prepare(struct drm_encoder *encoder)
 {
-       struct drm_encoder_helper_funcs *encoder_funcs =
+       const struct drm_encoder_helper_funcs *encoder_funcs =
            encoder->helper_private;
        /* lvds has its own version of prepare see psb_intel_lvds_prepare */
        encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF);
@@ -664,7 +664,7 @@ void gma_encoder_prepare(struct drm_encoder *encoder)
 
 void gma_encoder_commit(struct drm_encoder *encoder)
 {
-       struct drm_encoder_helper_funcs *encoder_funcs =
+       const struct drm_encoder_helper_funcs *encoder_funcs =
            encoder->helper_private;
        /* lvds has its own version of commit see psb_intel_lvds_commit */
        encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
index abf2248da61ecffec15d80fc0d07f0137f7418c0..89f705c3a5eb3a4242a3c2d785bd03f181d82945 100644 (file)
@@ -290,7 +290,7 @@ static int mdfld_dsi_connector_set_property(struct drm_connector *connector,
                                                encoder->crtc->primary->fb))
                                        goto set_prop_error;
                        } else {
-                               struct drm_encoder_helper_funcs *funcs =
+                               const struct drm_encoder_helper_funcs *funcs =
                                                encoder->helper_private;
                                funcs->mode_set(encoder,
                                        &gma_crtc->saved_mode,
index 8cc8a5abbc7bdd0852c1747f3b7924c0650e924d..acd38344b3026806869cf5e7fd06e76f715f13ba 100644 (file)
@@ -849,7 +849,7 @@ static int mdfld_crtc_mode_set(struct drm_crtc *crtc,
 
        /* Flush the plane changes */
        {
-               struct drm_crtc_helper_funcs *crtc_funcs =
+               const struct drm_crtc_helper_funcs *crtc_funcs =
                    crtc->helper_private;
                crtc_funcs->mode_set_base(crtc, x, y, old_fb);
        }
index 2de216c2374f34482f43008e20fab3eaffbb2e2b..1048f0c7c6ce7af84181184fc42133757e59cac7 100644 (file)
@@ -483,7 +483,7 @@ static int oaktrail_crtc_mode_set(struct drm_crtc *crtc,
 
        /* Flush the plane changes */
        {
-               struct drm_crtc_helper_funcs *crtc_funcs =
+               const struct drm_crtc_helper_funcs *crtc_funcs =
                    crtc->helper_private;
                crtc_funcs->mode_set_base(crtc, x, y, old_fb);
        }
index 54f73f50571ae65f590639df98c389b2ef75d82d..2310d879cdc2d436c5901d5974df8e9de84e1b0f 100644 (file)
@@ -347,7 +347,7 @@ int oaktrail_crtc_hdmi_mode_set(struct drm_crtc *crtc,
 
        /* Flush the plane changes */
        {
-               struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+               const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
                crtc_funcs->mode_set_base(crtc, x, y, old_fb);
        }
 
index b21a09451d1d506836b18f0ab7fb363ebfe7d924..6659da88fe5b3639da95078dc63cb9505b4a69af 100644 (file)
@@ -108,7 +108,7 @@ static int psb_intel_crtc_mode_set(struct drm_crtc *crtc,
        struct drm_device *dev = crtc->dev;
        struct drm_psb_private *dev_priv = dev->dev_private;
        struct gma_crtc *gma_crtc = to_gma_crtc(crtc);
-       struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
+       const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private;
        int pipe = gma_crtc->pipe;
        const struct psb_offset *map = &dev_priv->regmap[pipe];
        int refclk;
index 88aad95bde091ab82e0f5461361cbe682ec8ab10..ce0645d0c1e5f578a39038c73a78102d44dd04c7 100644 (file)
@@ -625,7 +625,7 @@ int psb_intel_lvds_set_property(struct drm_connector *connector,
                else
                         gma_backlight_set(encoder->dev, value);
        } else if (!strcmp(property->name, "DPMS")) {
-               struct drm_encoder_helper_funcs *hfuncs
+               const struct drm_encoder_helper_funcs *hfuncs
                                                = encoder->helper_private;
                hfuncs->dpms(encoder, value);
        }