diff options
author | Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com> | 2007-02-12 03:55:19 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-02-12 12:48:44 -0500 |
commit | 9791d763de8cca82b42a7a579e031db78e8011ff (patch) | |
tree | b3a13693bad97543a75a53a2c5d97ad63ed26c09 /drivers/video/modedb.c | |
parent | 5c52cbeb7f27e1242e88f99f7f6486a16d5733c7 (diff) |
[PATCH] fbdev modedb: make more pointer parameters const
fbdev modedb: make more input and output pointer parameters const
Signed-off-by: Geert Uytterhoeven <Geert.Uytterhoeven@sonycom.com>
Cc: James Simmons <jsimmons@infradead.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/modedb.c')
-rw-r--r-- | drivers/video/modedb.c | 33 |
1 files changed, 17 insertions, 16 deletions
diff --git a/drivers/video/modedb.c b/drivers/video/modedb.c index 53427a734d4b..61fc6cd25fc1 100644 --- a/drivers/video/modedb.c +++ b/drivers/video/modedb.c | |||
@@ -668,7 +668,7 @@ done: | |||
668 | * @var: pointer to struct fb_var_screeninfo | 668 | * @var: pointer to struct fb_var_screeninfo |
669 | */ | 669 | */ |
670 | void fb_var_to_videomode(struct fb_videomode *mode, | 670 | void fb_var_to_videomode(struct fb_videomode *mode, |
671 | struct fb_var_screeninfo *var) | 671 | const struct fb_var_screeninfo *var) |
672 | { | 672 | { |
673 | u32 pixclock, hfreq, htotal, vtotal; | 673 | u32 pixclock, hfreq, htotal, vtotal; |
674 | 674 | ||
@@ -712,7 +712,7 @@ void fb_var_to_videomode(struct fb_videomode *mode, | |||
712 | * @mode: pointer to struct fb_videomode | 712 | * @mode: pointer to struct fb_videomode |
713 | */ | 713 | */ |
714 | void fb_videomode_to_var(struct fb_var_screeninfo *var, | 714 | void fb_videomode_to_var(struct fb_var_screeninfo *var, |
715 | struct fb_videomode *mode) | 715 | const struct fb_videomode *mode) |
716 | { | 716 | { |
717 | var->xres = mode->xres; | 717 | var->xres = mode->xres; |
718 | var->yres = mode->yres; | 718 | var->yres = mode->yres; |
@@ -735,8 +735,8 @@ void fb_videomode_to_var(struct fb_var_screeninfo *var, | |||
735 | * RETURNS: | 735 | * RETURNS: |
736 | * 1 if equal, 0 if not | 736 | * 1 if equal, 0 if not |
737 | */ | 737 | */ |
738 | int fb_mode_is_equal(struct fb_videomode *mode1, | 738 | int fb_mode_is_equal(const struct fb_videomode *mode1, |
739 | struct fb_videomode *mode2) | 739 | const struct fb_videomode *mode2) |
740 | { | 740 | { |
741 | return (mode1->xres == mode2->xres && | 741 | return (mode1->xres == mode2->xres && |
742 | mode1->yres == mode2->yres && | 742 | mode1->yres == mode2->yres && |
@@ -768,8 +768,8 @@ int fb_mode_is_equal(struct fb_videomode *mode1, | |||
768 | * var->xres and var->yres. If more than 1 videomode is found, will return | 768 | * var->xres and var->yres. If more than 1 videomode is found, will return |
769 | * the videomode with the highest refresh rate | 769 | * the videomode with the highest refresh rate |
770 | */ | 770 | */ |
771 | struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, | 771 | const struct fb_videomode *fb_find_best_mode(const struct fb_var_screeninfo *var, |
772 | struct list_head *head) | 772 | struct list_head *head) |
773 | { | 773 | { |
774 | struct list_head *pos; | 774 | struct list_head *pos; |
775 | struct fb_modelist *modelist; | 775 | struct fb_modelist *modelist; |
@@ -806,8 +806,8 @@ struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, | |||
806 | * If more than 1 videomode is found, will return the videomode with | 806 | * If more than 1 videomode is found, will return the videomode with |
807 | * the closest refresh rate. | 807 | * the closest refresh rate. |
808 | */ | 808 | */ |
809 | struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, | 809 | const struct fb_videomode *fb_find_nearest_mode(const struct fb_videomode *mode, |
810 | struct list_head *head) | 810 | struct list_head *head) |
811 | { | 811 | { |
812 | struct list_head *pos; | 812 | struct list_head *pos; |
813 | struct fb_modelist *modelist; | 813 | struct fb_modelist *modelist; |
@@ -845,8 +845,8 @@ struct fb_videomode *fb_find_nearest_mode(struct fb_videomode *mode, | |||
845 | * RETURNS: | 845 | * RETURNS: |
846 | * struct fb_videomode, NULL if none found | 846 | * struct fb_videomode, NULL if none found |
847 | */ | 847 | */ |
848 | struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, | 848 | const struct fb_videomode *fb_match_mode(const struct fb_var_screeninfo *var, |
849 | struct list_head *head) | 849 | struct list_head *head) |
850 | { | 850 | { |
851 | struct list_head *pos; | 851 | struct list_head *pos; |
852 | struct fb_modelist *modelist; | 852 | struct fb_modelist *modelist; |
@@ -870,7 +870,7 @@ struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, | |||
870 | * NOTES: | 870 | * NOTES: |
871 | * Will only add unmatched mode entries | 871 | * Will only add unmatched mode entries |
872 | */ | 872 | */ |
873 | int fb_add_videomode(struct fb_videomode *mode, struct list_head *head) | 873 | int fb_add_videomode(const struct fb_videomode *mode, struct list_head *head) |
874 | { | 874 | { |
875 | struct list_head *pos; | 875 | struct list_head *pos; |
876 | struct fb_modelist *modelist; | 876 | struct fb_modelist *modelist; |
@@ -905,7 +905,8 @@ int fb_add_videomode(struct fb_videomode *mode, struct list_head *head) | |||
905 | * NOTES: | 905 | * NOTES: |
906 | * Will remove all matching mode entries | 906 | * Will remove all matching mode entries |
907 | */ | 907 | */ |
908 | void fb_delete_videomode(struct fb_videomode *mode, struct list_head *head) | 908 | void fb_delete_videomode(const struct fb_videomode *mode, |
909 | struct list_head *head) | ||
909 | { | 910 | { |
910 | struct list_head *pos, *n; | 911 | struct list_head *pos, *n; |
911 | struct fb_modelist *modelist; | 912 | struct fb_modelist *modelist; |
@@ -941,7 +942,7 @@ void fb_destroy_modelist(struct list_head *head) | |||
941 | * @num: number of entries in array | 942 | * @num: number of entries in array |
942 | * @head: struct list_head of modelist | 943 | * @head: struct list_head of modelist |
943 | */ | 944 | */ |
944 | void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, | 945 | void fb_videomode_to_modelist(const struct fb_videomode *modedb, int num, |
945 | struct list_head *head) | 946 | struct list_head *head) |
946 | { | 947 | { |
947 | int i; | 948 | int i; |
@@ -954,12 +955,12 @@ void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, | |||
954 | } | 955 | } |
955 | } | 956 | } |
956 | 957 | ||
957 | struct fb_videomode *fb_find_best_display(struct fb_monspecs *specs, | 958 | const struct fb_videomode *fb_find_best_display(const struct fb_monspecs *specs, |
958 | struct list_head *head) | 959 | struct list_head *head) |
959 | { | 960 | { |
960 | struct list_head *pos; | 961 | struct list_head *pos; |
961 | struct fb_modelist *modelist; | 962 | struct fb_modelist *modelist; |
962 | struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL; | 963 | const struct fb_videomode *m, *m1 = NULL, *md = NULL, *best = NULL; |
963 | int first = 0; | 964 | int first = 0; |
964 | 965 | ||
965 | if (!head->prev || !head->next || list_empty(head)) | 966 | if (!head->prev || !head->next || list_empty(head)) |