diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-01-26 04:49:47 -0500 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-02-22 20:13:11 -0500 |
commit | b1f559ecdc6026ef783ccadc62a61e7da906fcb4 (patch) | |
tree | 0191b560a045c6490c326ef0c027797ba9886ffa /include/drm | |
parent | 60b212f8ddcdbbfa8595f40300756b9ea8dd387e (diff) |
drm: Mark constant arrays of drm_display_mode const
... and fixup some methods to accept the constant argument.
Now that constant module arrays are loaded into read-only memory, using
const appropriately has some benefits beyond warning the programmer
about likely mistakes.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_crtc.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/drm/drm_crtc.h b/include/drm/drm_crtc.h index 080a6e33470e..60edf9be31e5 100644 --- a/include/drm/drm_crtc.h +++ b/include/drm/drm_crtc.h | |||
@@ -659,7 +659,7 @@ extern int drm_add_edid_modes(struct drm_connector *connector, struct edid *edid | |||
659 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); | 659 | extern void drm_mode_probed_add(struct drm_connector *connector, struct drm_display_mode *mode); |
660 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); | 660 | extern void drm_mode_remove(struct drm_connector *connector, struct drm_display_mode *mode); |
661 | extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, | 661 | extern struct drm_display_mode *drm_mode_duplicate(struct drm_device *dev, |
662 | struct drm_display_mode *mode); | 662 | const struct drm_display_mode *mode); |
663 | extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); | 663 | extern void drm_mode_debug_printmodeline(struct drm_display_mode *mode); |
664 | extern void drm_mode_config_init(struct drm_device *dev); | 664 | extern void drm_mode_config_init(struct drm_device *dev); |
665 | extern void drm_mode_config_reset(struct drm_device *dev); | 665 | extern void drm_mode_config_reset(struct drm_device *dev); |
@@ -685,8 +685,8 @@ extern void drm_mode_validate_size(struct drm_device *dev, | |||
685 | extern void drm_mode_prune_invalid(struct drm_device *dev, | 685 | extern void drm_mode_prune_invalid(struct drm_device *dev, |
686 | struct list_head *mode_list, bool verbose); | 686 | struct list_head *mode_list, bool verbose); |
687 | extern void drm_mode_sort(struct list_head *mode_list); | 687 | extern void drm_mode_sort(struct list_head *mode_list); |
688 | extern int drm_mode_hsync(struct drm_display_mode *mode); | 688 | extern int drm_mode_hsync(const struct drm_display_mode *mode); |
689 | extern int drm_mode_vrefresh(struct drm_display_mode *mode); | 689 | extern int drm_mode_vrefresh(const struct drm_display_mode *mode); |
690 | extern void drm_mode_set_crtcinfo(struct drm_display_mode *p, | 690 | extern void drm_mode_set_crtcinfo(struct drm_display_mode *p, |
691 | int adjust_flags); | 691 | int adjust_flags); |
692 | extern void drm_mode_connector_list_update(struct drm_connector *connector); | 692 | extern void drm_mode_connector_list_update(struct drm_connector *connector); |