aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2015-04-13 04:21:42 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2015-04-13 09:00:13 -0400
commit9a436ee6c3f311f2ae604d775d7de06a49f8c9a0 (patch)
tree19d66d3938f30d7e93912b4bd74c8fadf2945687
parent0d4d936f49d3baa5e078ea6dafebcbdd3ec4449d (diff)
drm: make crtc/encoder/connector/plane helper_private a const pointer
They're only used to store const pointers anyway. This helps to keep Ville and the compiler happy. Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r--include/drm/drm_crtc.h8
-rw-r--r--include/drm/drm_crtc_helper.h6
-rw-r--r--include/drm/drm_plane_helper.h2
3 files changed, 8 insertions, 8 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h
index 7b5c661b37d8..97c33b40005f 100644
--- a/include/drm/drm_crtc.h
+++ b/include/drm/drm_crtc.h
@@ -467,7 +467,7 @@ struct drm_crtc {
467 int framedur_ns, linedur_ns, pixeldur_ns; 467 int framedur_ns, linedur_ns, pixeldur_ns;
468 468
469 /* if you are using the helper */ 469 /* if you are using the helper */
470 void *helper_private; 470 const void *helper_private;
471 471
472 struct drm_object_properties properties; 472 struct drm_object_properties properties;
473 473
@@ -597,7 +597,7 @@ struct drm_encoder {
597 struct drm_crtc *crtc; 597 struct drm_crtc *crtc;
598 struct drm_bridge *bridge; 598 struct drm_bridge *bridge;
599 const struct drm_encoder_funcs *funcs; 599 const struct drm_encoder_funcs *funcs;
600 void *helper_private; 600 const void *helper_private;
601}; 601};
602 602
603/* should we poll this connector for connects and disconnects */ 603/* should we poll this connector for connects and disconnects */
@@ -701,7 +701,7 @@ struct drm_connector {
701 /* requested DPMS state */ 701 /* requested DPMS state */
702 int dpms; 702 int dpms;
703 703
704 void *helper_private; 704 const void *helper_private;
705 705
706 /* forced on connector */ 706 /* forced on connector */
707 struct drm_cmdline_mode cmdline_mode; 707 struct drm_cmdline_mode cmdline_mode;
@@ -864,7 +864,7 @@ struct drm_plane {
864 864
865 enum drm_plane_type type; 865 enum drm_plane_type type;
866 866
867 void *helper_private; 867 const void *helper_private;
868 868
869 struct drm_plane_state *state; 869 struct drm_plane_state *state;
870}; 870};
diff --git a/include/drm/drm_crtc_helper.h b/include/drm/drm_crtc_helper.h
index 92d5135b55d2..c8fc187061de 100644
--- a/include/drm/drm_crtc_helper.h
+++ b/include/drm/drm_crtc_helper.h
@@ -197,19 +197,19 @@ extern void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
197static inline void drm_crtc_helper_add(struct drm_crtc *crtc, 197static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
198 const struct drm_crtc_helper_funcs *funcs) 198 const struct drm_crtc_helper_funcs *funcs)
199{ 199{
200 crtc->helper_private = (void *)funcs; 200 crtc->helper_private = funcs;
201} 201}
202 202
203static inline void drm_encoder_helper_add(struct drm_encoder *encoder, 203static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
204 const struct drm_encoder_helper_funcs *funcs) 204 const struct drm_encoder_helper_funcs *funcs)
205{ 205{
206 encoder->helper_private = (void *)funcs; 206 encoder->helper_private = funcs;
207} 207}
208 208
209static inline void drm_connector_helper_add(struct drm_connector *connector, 209static inline void drm_connector_helper_add(struct drm_connector *connector,
210 const struct drm_connector_helper_funcs *funcs) 210 const struct drm_connector_helper_funcs *funcs)
211{ 211{
212 connector->helper_private = (void *)funcs; 212 connector->helper_private = funcs;
213} 213}
214 214
215extern void drm_helper_resume_force_mode(struct drm_device *dev); 215extern void drm_helper_resume_force_mode(struct drm_device *dev);
diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h
index e48157a5a59c..96e16283afb9 100644
--- a/include/drm/drm_plane_helper.h
+++ b/include/drm/drm_plane_helper.h
@@ -76,7 +76,7 @@ struct drm_plane_helper_funcs {
76static inline void drm_plane_helper_add(struct drm_plane *plane, 76static inline void drm_plane_helper_add(struct drm_plane *plane,
77 const struct drm_plane_helper_funcs *funcs) 77 const struct drm_plane_helper_funcs *funcs)
78{ 78{
79 plane->helper_private = (void *)funcs; 79 plane->helper_private = funcs;
80} 80}
81 81
82extern int drm_plane_helper_check_update(struct drm_plane *plane, 82extern int drm_plane_helper_check_update(struct drm_plane *plane,