Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 45fe734c authored by Jani Nikula's avatar Jani Nikula Committed by Daniel Vetter
Browse files

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: default avatarJani Nikula <jani.nikula@intel.com>
Reviewed-by: default avatarPatrik Jakobsson <patrik.r.jakobsson@gmail.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent d584ff82
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -823,7 +823,7 @@ static int cdv_intel_crtc_mode_set(struct drm_crtc *crtc,


	/* Flush the plane changes */
	/* Flush the plane changes */
	{
	{
		struct drm_crtc_helper_funcs *crtc_funcs =
		const struct drm_crtc_helper_funcs *crtc_funcs =
		    crtc->helper_private;
		    crtc->helper_private;
		crtc_funcs->mode_set_base(crtc, x, y, old_fb);
		crtc_funcs->mode_set_base(crtc, x, y, old_fb);
	}
	}
+1 −1
Original line number Original line Diff line number Diff line
@@ -195,7 +195,7 @@ static int cdv_hdmi_set_property(struct drm_connector *connector,
					    encoder->crtc->x, encoder->crtc->y, encoder->crtc->primary->fb))
					    encoder->crtc->x, encoder->crtc->y, encoder->crtc->primary->fb))
					return -1;
					return -1;
			} else {
			} else {
				struct drm_encoder_helper_funcs *helpers
				const struct drm_encoder_helper_funcs *helpers
						    = encoder->helper_private;
						    = encoder->helper_private;
				helpers->mode_set(encoder, &crtc->saved_mode,
				helpers->mode_set(encoder, &crtc->saved_mode,
					     &crtc->saved_adjusted_mode);
					     &crtc->saved_adjusted_mode);
+1 −1
Original line number Original line Diff line number Diff line
@@ -505,7 +505,7 @@ static int cdv_intel_lvds_set_property(struct drm_connector *connector,
		else
		else
                        gma_backlight_set(encoder->dev, value);
                        gma_backlight_set(encoder->dev, value);
	} else if (!strcmp(property->name, "DPMS") && encoder) {
	} else if (!strcmp(property->name, "DPMS") && encoder) {
		struct drm_encoder_helper_funcs *helpers =
		const struct drm_encoder_helper_funcs *helpers =
					encoder->helper_private;
					encoder->helper_private;
		helpers->dpms(encoder, value);
		helpers->dpms(encoder, value);
	}
	}
+5 −5
Original line number Original line Diff line number Diff line
@@ -501,20 +501,20 @@ bool gma_crtc_mode_fixup(struct drm_crtc *crtc,


void gma_crtc_prepare(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);
	crtc_funcs->dpms(crtc, DRM_MODE_DPMS_OFF);
}
}


void gma_crtc_commit(struct drm_crtc *crtc)
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);
	crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON);
}
}


void gma_crtc_disable(struct drm_crtc *crtc)
void gma_crtc_disable(struct drm_crtc *crtc)
{
{
	struct gtt_range *gt;
	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);
	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)
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;
	    encoder->helper_private;
	/* lvds has its own version of prepare see psb_intel_lvds_prepare */
	/* lvds has its own version of prepare see psb_intel_lvds_prepare */
	encoder_funcs->dpms(encoder, DRM_MODE_DPMS_OFF);
	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)
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;
	    encoder->helper_private;
	/* lvds has its own version of commit see psb_intel_lvds_commit */
	/* lvds has its own version of commit see psb_intel_lvds_commit */
	encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
	encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON);
+1 −1
Original line number Original line Diff line number Diff line
@@ -290,7 +290,7 @@ static int mdfld_dsi_connector_set_property(struct drm_connector *connector,
						encoder->crtc->primary->fb))
						encoder->crtc->primary->fb))
					goto set_prop_error;
					goto set_prop_error;
			} else {
			} else {
				struct drm_encoder_helper_funcs *funcs =
				const struct drm_encoder_helper_funcs *funcs =
						encoder->helper_private;
						encoder->helper_private;
				funcs->mode_set(encoder,
				funcs->mode_set(encoder,
					&gma_crtc->saved_mode,
					&gma_crtc->saved_mode,
Loading