* Wrapper fxns which can be plugged in to drm_encoder_helper_funcs:
  */
 
-static inline struct drm_encoder_slave_funcs *
+static inline const struct drm_encoder_slave_funcs *
 get_slave_funcs(struct drm_encoder *enc)
 {
        return to_encoder_slave(enc)->slave_funcs;
 
        return &enc->base.base;
 }
 
-static inline struct drm_encoder_slave_funcs *
+static inline const struct drm_encoder_slave_funcs *
 get_slave_funcs(struct drm_encoder *enc)
 {
        return to_encoder_slave(enc)->slave_funcs;
 
 {
        struct rcar_du_connector *con = to_rcar_connector(connector);
        struct drm_encoder *encoder = rcar_encoder_to_drm_encoder(con->encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (sfuncs->get_modes == NULL)
                return 0;
 {
        struct rcar_du_connector *con = to_rcar_connector(connector);
        struct drm_encoder *encoder = rcar_encoder_to_drm_encoder(con->encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (sfuncs->mode_valid == NULL)
                return MODE_OK;
 {
        struct rcar_du_connector *con = to_rcar_connector(connector);
        struct drm_encoder *encoder = rcar_encoder_to_drm_encoder(con->encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (sfuncs->detect == NULL)
                return connector_status_unknown;
 
 static void rcar_du_hdmienc_disable(struct drm_encoder *encoder)
 {
        struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (sfuncs->dpms)
                sfuncs->dpms(encoder, DRM_MODE_DPMS_OFF);
 static void rcar_du_hdmienc_enable(struct drm_encoder *encoder)
 {
        struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (hdmienc->renc->lvds)
                rcar_du_lvdsenc_enable(hdmienc->renc->lvds, encoder->crtc,
                                        struct drm_connector_state *conn_state)
 {
        struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
        struct drm_display_mode *adjusted_mode = &crtc_state->adjusted_mode;
        const struct drm_display_mode *mode = &crtc_state->mode;
 
                                     struct drm_display_mode *adjusted_mode)
 {
        struct rcar_du_hdmienc *hdmienc = to_rcar_hdmienc(encoder);
-       struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
+       const struct drm_encoder_slave_funcs *sfuncs = to_slave_funcs(encoder);
 
        if (sfuncs->mode_set)
                sfuncs->mode_set(encoder, mode, adjusted_mode);
 
 struct drm_encoder_slave {
        struct drm_encoder base;
 
-       struct drm_encoder_slave_funcs *slave_funcs;
+       const struct drm_encoder_slave_funcs *slave_funcs;
        void *slave_priv;
        void *bus_priv;
 };