Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/gma500: constify all struct drm_*_helper funcs pointers

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>

authored by

Jani Nikula and committed by
Daniel Vetter
45fe734c d584ff82

+14 -14
+1 -1
drivers/gpu/drm/gma500/cdv_intel_display.c
··· 823 823 824 824 /* Flush the plane changes */ 825 825 { 826 - struct drm_crtc_helper_funcs *crtc_funcs = 826 + const struct drm_crtc_helper_funcs *crtc_funcs = 827 827 crtc->helper_private; 828 828 crtc_funcs->mode_set_base(crtc, x, y, old_fb); 829 829 }
+1 -1
drivers/gpu/drm/gma500/cdv_intel_hdmi.c
··· 195 195 encoder->crtc->x, encoder->crtc->y, encoder->crtc->primary->fb)) 196 196 return -1; 197 197 } else { 198 - struct drm_encoder_helper_funcs *helpers 198 + const struct drm_encoder_helper_funcs *helpers 199 199 = encoder->helper_private; 200 200 helpers->mode_set(encoder, &crtc->saved_mode, 201 201 &crtc->saved_adjusted_mode);
+1 -1
drivers/gpu/drm/gma500/cdv_intel_lvds.c
··· 505 505 else 506 506 gma_backlight_set(encoder->dev, value); 507 507 } else if (!strcmp(property->name, "DPMS") && encoder) { 508 - struct drm_encoder_helper_funcs *helpers = 508 + const struct drm_encoder_helper_funcs *helpers = 509 509 encoder->helper_private; 510 510 helpers->dpms(encoder, value); 511 511 }
+5 -5
drivers/gpu/drm/gma500/gma_display.c
··· 501 501 502 502 void gma_crtc_prepare(struct drm_crtc *crtc) 503 503 { 504 - struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 504 + const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 505 505 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); 506 506 } 507 507 508 508 void gma_crtc_commit(struct drm_crtc *crtc) 509 509 { 510 - struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 510 + const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 511 511 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); 512 512 } 513 513 514 514 void gma_crtc_disable(struct drm_crtc *crtc) 515 515 { 516 516 struct gtt_range *gt; 517 - struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 517 + const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 518 518 519 519 crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF); 520 520 ··· 656 656 657 657 void gma_encoder_prepare(struct drm_encoder *encoder) 658 658 { 659 - struct drm_encoder_helper_funcs *encoder_funcs = 659 + const struct drm_encoder_helper_funcs *encoder_funcs = 660 660 encoder->helper_private; 661 661 /* lvds has its own version of prepare see psb_intel_lvds_prepare */ 662 662 encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF); ··· 664 664 665 665 void gma_encoder_commit(struct drm_encoder *encoder) 666 666 { 667 - struct drm_encoder_helper_funcs *encoder_funcs = 667 + const struct drm_encoder_helper_funcs *encoder_funcs = 668 668 encoder->helper_private; 669 669 /* lvds has its own version of commit see psb_intel_lvds_commit */ 670 670 encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
+1 -1
drivers/gpu/drm/gma500/mdfld_dsi_output.c
··· 290 290 encoder->crtc->primary->fb)) 291 291 goto set_prop_error; 292 292 } else { 293 - struct drm_encoder_helper_funcs *funcs = 293 + const struct drm_encoder_helper_funcs *funcs = 294 294 encoder->helper_private; 295 295 funcs->mode_set(encoder, 296 296 &gma_crtc->saved_mode,
+1 -1
drivers/gpu/drm/gma500/mdfld_intel_display.c
··· 849 849 850 850 /* Flush the plane changes */ 851 851 { 852 - struct drm_crtc_helper_funcs *crtc_funcs = 852 + const struct drm_crtc_helper_funcs *crtc_funcs = 853 853 crtc->helper_private; 854 854 crtc_funcs->mode_set_base(crtc, x, y, old_fb); 855 855 }
+1 -1
drivers/gpu/drm/gma500/oaktrail_crtc.c
··· 483 483 484 484 /* Flush the plane changes */ 485 485 { 486 - struct drm_crtc_helper_funcs *crtc_funcs = 486 + const struct drm_crtc_helper_funcs *crtc_funcs = 487 487 crtc->helper_private; 488 488 crtc_funcs->mode_set_base(crtc, x, y, old_fb); 489 489 }
+1 -1
drivers/gpu/drm/gma500/oaktrail_hdmi.c
··· 347 347 348 348 /* Flush the plane changes */ 349 349 { 350 - struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 350 + const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 351 351 crtc_funcs->mode_set_base(crtc, x, y, old_fb); 352 352 } 353 353
+1 -1
drivers/gpu/drm/gma500/psb_intel_display.c
··· 108 108 struct drm_device *dev = crtc->dev; 109 109 struct drm_psb_private *dev_priv = dev->dev_private; 110 110 struct gma_crtc *gma_crtc = to_gma_crtc(crtc); 111 - struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 111 + const struct drm_crtc_helper_funcs *crtc_funcs = crtc->helper_private; 112 112 int pipe = gma_crtc->pipe; 113 113 const struct psb_offset *map = &dev_priv->regmap[pipe]; 114 114 int refclk;
+1 -1
drivers/gpu/drm/gma500/psb_intel_lvds.c
··· 625 625 else 626 626 gma_backlight_set(encoder->dev, value); 627 627 } else if (!strcmp(property->name, "DPMS")) { 628 - struct drm_encoder_helper_funcs *hfuncs 628 + const struct drm_encoder_helper_funcs *hfuncs 629 629 = encoder->helper_private; 630 630 hfuncs->dpms(encoder, value); 631 631 }