Skip to content

Commit

Permalink
drm: make crtc/encoder/connector/plane helper_private a const pointer
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jani Nikula authored and Daniel Vetter committed Apr 13, 2015
1 parent 0d4d936 commit 9a436ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions include/drm/drm_crtc.h
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ struct drm_crtc {
int framedur_ns, linedur_ns, pixeldur_ns;

/* if you are using the helper */
void *helper_private;
const void *helper_private;

struct drm_object_properties properties;

Expand Down Expand Up @@ -597,7 +597,7 @@ struct drm_encoder {
struct drm_crtc *crtc;
struct drm_bridge *bridge;
const struct drm_encoder_funcs *funcs;
void *helper_private;
const void *helper_private;
};

/* should we poll this connector for connects and disconnects */
Expand Down Expand Up @@ -701,7 +701,7 @@ struct drm_connector {
/* requested DPMS state */
int dpms;

void *helper_private;
const void *helper_private;

/* forced on connector */
struct drm_cmdline_mode cmdline_mode;
Expand Down Expand Up @@ -864,7 +864,7 @@ struct drm_plane {

enum drm_plane_type type;

void *helper_private;
const void *helper_private;

struct drm_plane_state *state;
};
Expand Down
6 changes: 3 additions & 3 deletions include/drm/drm_crtc_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -197,19 +197,19 @@ extern void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
static inline void drm_crtc_helper_add(struct drm_crtc *crtc,
const struct drm_crtc_helper_funcs *funcs)
{
crtc->helper_private = (void *)funcs;
crtc->helper_private = funcs;
}

static inline void drm_encoder_helper_add(struct drm_encoder *encoder,
const struct drm_encoder_helper_funcs *funcs)
{
encoder->helper_private = (void *)funcs;
encoder->helper_private = funcs;
}

static inline void drm_connector_helper_add(struct drm_connector *connector,
const struct drm_connector_helper_funcs *funcs)
{
connector->helper_private = (void *)funcs;
connector->helper_private = funcs;
}

extern void drm_helper_resume_force_mode(struct drm_device *dev);
Expand Down
2 changes: 1 addition & 1 deletion include/drm/drm_plane_helper.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ struct drm_plane_helper_funcs {
static inline void drm_plane_helper_add(struct drm_plane *plane,
const struct drm_plane_helper_funcs *funcs)
{
plane->helper_private = (void *)funcs;
plane->helper_private = funcs;
}

extern int drm_plane_helper_check_update(struct drm_plane *plane,
Expand Down

0 comments on commit 9a436ee

Please sign in to comment.