aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/cx18/cx18-controls.c2
-rw-r--r--drivers/media/video/cx2341x.c8
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-ctrl.c6
-rw-r--r--drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h2
-rw-r--r--drivers/media/video/v4l2-common.c6
-rw-r--r--drivers/media/video/v4l2-ctrls.c46
6 files changed, 35 insertions, 35 deletions
diff --git a/drivers/media/video/cx18/cx18-controls.c b/drivers/media/video/cx18/cx18-controls.c
index 67043c7b452b..97d7b7e100a3 100644
--- a/drivers/media/video/cx18/cx18-controls.c
+++ b/drivers/media/video/cx18/cx18-controls.c
@@ -108,7 +108,7 @@ static int cx18_try_ctrl(struct file *file, void *fh,
108 struct v4l2_ext_control *vctrl) 108 struct v4l2_ext_control *vctrl)
109{ 109{
110 struct v4l2_queryctrl qctrl; 110 struct v4l2_queryctrl qctrl;
111 const char **menu_items = NULL; 111 const char * const *menu_items = NULL;
112 int err; 112 int err;
113 113
114 qctrl.id = vctrl->id; 114 qctrl.id = vctrl->id;
diff --git a/drivers/media/video/cx2341x.c b/drivers/media/video/cx2341x.c
index e5c3c8da4be3..103ef6bad2e2 100644
--- a/drivers/media/video/cx2341x.c
+++ b/drivers/media/video/cx2341x.c
@@ -853,9 +853,9 @@ int cx2341x_ctrl_query(const struct cx2341x_mpeg_params *params,
853} 853}
854EXPORT_SYMBOL(cx2341x_ctrl_query); 854EXPORT_SYMBOL(cx2341x_ctrl_query);
855 855
856const char **cx2341x_ctrl_get_menu(const struct cx2341x_mpeg_params *p, u32 id) 856const char * const *cx2341x_ctrl_get_menu(const struct cx2341x_mpeg_params *p, u32 id)
857{ 857{
858 static const char *mpeg_stream_type_without_ts[] = { 858 static const char * const mpeg_stream_type_without_ts[] = {
859 "MPEG-2 Program Stream", 859 "MPEG-2 Program Stream",
860 "", 860 "",
861 "MPEG-1 System Stream", 861 "MPEG-1 System Stream",
@@ -952,7 +952,7 @@ int cx2341x_ext_ctrls(struct cx2341x_mpeg_params *params, int busy,
952 for (i = 0; i < ctrls->count; i++) { 952 for (i = 0; i < ctrls->count; i++) {
953 struct v4l2_ext_control *ctrl = ctrls->controls + i; 953 struct v4l2_ext_control *ctrl = ctrls->controls + i;
954 struct v4l2_queryctrl qctrl; 954 struct v4l2_queryctrl qctrl;
955 const char **menu_items = NULL; 955 const char * const *menu_items = NULL;
956 956
957 qctrl.id = ctrl->id; 957 qctrl.id = ctrl->id;
958 err = cx2341x_ctrl_query(params, &qctrl); 958 err = cx2341x_ctrl_query(params, &qctrl);
@@ -1135,7 +1135,7 @@ EXPORT_SYMBOL(cx2341x_update);
1135 1135
1136static const char *cx2341x_menu_item(const struct cx2341x_mpeg_params *p, u32 id) 1136static const char *cx2341x_menu_item(const struct cx2341x_mpeg_params *p, u32 id)
1137{ 1137{
1138 const char **menu = cx2341x_ctrl_get_menu(p, id); 1138 const char * const *menu = cx2341x_ctrl_get_menu(p, id);
1139 struct v4l2_ext_control ctrl; 1139 struct v4l2_ext_control ctrl;
1140 1140
1141 if (menu == NULL) 1141 if (menu == NULL)
diff --git a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
index 55ea914c7fcd..7d5a7139a45a 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
+++ b/drivers/media/video/pvrusb2/pvrusb2-ctrl.c
@@ -203,7 +203,7 @@ int pvr2_ctrl_get_valname(struct pvr2_ctrl *cptr,int val,
203 *blen = 0; 203 *blen = 0;
204 LOCK_TAKE(cptr->hdw->big_lock); do { 204 LOCK_TAKE(cptr->hdw->big_lock); do {
205 if (cptr->info->type == pvr2_ctl_enum) { 205 if (cptr->info->type == pvr2_ctl_enum) {
206 const char **names; 206 const char * const *names;
207 names = cptr->info->def.type_enum.value_names; 207 names = cptr->info->def.type_enum.value_names;
208 if (pvr2_ctrl_range_check(cptr,val) == 0) { 208 if (pvr2_ctrl_range_check(cptr,val) == 0) {
209 if (names[val]) { 209 if (names[val]) {
@@ -367,7 +367,7 @@ static const char *boolNames[] = {
367 367
368static int parse_token(const char *ptr,unsigned int len, 368static int parse_token(const char *ptr,unsigned int len,
369 int *valptr, 369 int *valptr,
370 const char **names,unsigned int namecnt) 370 const char * const *names, unsigned int namecnt)
371{ 371{
372 char buf[33]; 372 char buf[33];
373 unsigned int slen; 373 unsigned int slen;
@@ -559,7 +559,7 @@ int pvr2_ctrl_value_to_sym_internal(struct pvr2_ctrl *cptr,
559 *len = scnprintf(buf,maxlen,"%s",val ? "true" : "false"); 559 *len = scnprintf(buf,maxlen,"%s",val ? "true" : "false");
560 ret = 0; 560 ret = 0;
561 } else if (cptr->info->type == pvr2_ctl_enum) { 561 } else if (cptr->info->type == pvr2_ctl_enum) {
562 const char **names; 562 const char * const *names;
563 names = cptr->info->def.type_enum.value_names; 563 names = cptr->info->def.type_enum.value_names;
564 if ((val >= 0) && 564 if ((val >= 0) &&
565 (val < cptr->info->def.type_enum.count)) { 565 (val < cptr->info->def.type_enum.count)) {
diff --git a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
index cb4057bb07a0..ac94a8bf883e 100644
--- a/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
+++ b/drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h
@@ -115,7 +115,7 @@ struct pvr2_ctl_info {
115 } type_int; 115 } type_int;
116 struct { /* enumerated control */ 116 struct { /* enumerated control */
117 unsigned int count; /* enum value count */ 117 unsigned int count; /* enum value count */
118 const char **value_names; /* symbol names */ 118 const char * const *value_names; /* symbol names */
119 } type_enum; 119 } type_enum;
120 struct { /* bitmask control */ 120 struct { /* bitmask control */
121 unsigned int valid_bits; /* bits in use */ 121 unsigned int valid_bits; /* bits in use */
diff --git a/drivers/media/video/v4l2-common.c b/drivers/media/video/v4l2-common.c
index b5eb1f3950b1..3f0871b550ad 100644
--- a/drivers/media/video/v4l2-common.c
+++ b/drivers/media/video/v4l2-common.c
@@ -150,7 +150,7 @@ EXPORT_SYMBOL(v4l2_prio_check);
150 struct v4l2_queryctrl and the available menu items. Note that 150 struct v4l2_queryctrl and the available menu items. Note that
151 menu_items may be NULL, in that case it is ignored. */ 151 menu_items may be NULL, in that case it is ignored. */
152int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl, 152int v4l2_ctrl_check(struct v4l2_ext_control *ctrl, struct v4l2_queryctrl *qctrl,
153 const char **menu_items) 153 const char * const *menu_items)
154{ 154{
155 if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED) 155 if (qctrl->flags & V4L2_CTRL_FLAG_DISABLED)
156 return -EINVAL; 156 return -EINVAL;
@@ -199,7 +199,7 @@ EXPORT_SYMBOL(v4l2_ctrl_query_fill);
199 If menu_items is NULL, then the menu items are retrieved using 199 If menu_items is NULL, then the menu items are retrieved using
200 v4l2_ctrl_get_menu. */ 200 v4l2_ctrl_get_menu. */
201int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl, 201int v4l2_ctrl_query_menu(struct v4l2_querymenu *qmenu, struct v4l2_queryctrl *qctrl,
202 const char **menu_items) 202 const char * const *menu_items)
203{ 203{
204 int i; 204 int i;
205 205
@@ -222,7 +222,7 @@ EXPORT_SYMBOL(v4l2_ctrl_query_menu);
222 Use this if there are 'holes' in the list of valid menu items. */ 222 Use this if there are 'holes' in the list of valid menu items. */
223int v4l2_ctrl_query_menu_valid_items(struct v4l2_querymenu *qmenu, const u32 *ids) 223int v4l2_ctrl_query_menu_valid_items(struct v4l2_querymenu *qmenu, const u32 *ids)
224{ 224{
225 const char **menu_items = v4l2_ctrl_get_menu(qmenu->id); 225 const char * const *menu_items = v4l2_ctrl_get_menu(qmenu->id);
226 226
227 qmenu->reserved = 0; 227 qmenu->reserved = 0;
228 if (menu_items == NULL || ids == NULL) 228 if (menu_items == NULL || ids == NULL)
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c
index 9d2502cd03ff..6c0fadc2beab 100644
--- a/drivers/media/video/v4l2-ctrls.c
+++ b/drivers/media/video/v4l2-ctrls.c
@@ -38,15 +38,15 @@ struct ctrl_helper {
38 the given control ID. The pointer array ends with a NULL pointer. 38 the given control ID. The pointer array ends with a NULL pointer.
39 An empty string signifies a menu entry that is invalid. This allows 39 An empty string signifies a menu entry that is invalid. This allows
40 drivers to disable certain options if it is not supported. */ 40 drivers to disable certain options if it is not supported. */
41const char **v4l2_ctrl_get_menu(u32 id) 41const char * const *v4l2_ctrl_get_menu(u32 id)
42{ 42{
43 static const char *mpeg_audio_sampling_freq[] = { 43 static const char * const mpeg_audio_sampling_freq[] = {
44 "44.1 kHz", 44 "44.1 kHz",
45 "48 kHz", 45 "48 kHz",
46 "32 kHz", 46 "32 kHz",
47 NULL 47 NULL
48 }; 48 };
49 static const char *mpeg_audio_encoding[] = { 49 static const char * const mpeg_audio_encoding[] = {
50 "MPEG-1/2 Layer I", 50 "MPEG-1/2 Layer I",
51 "MPEG-1/2 Layer II", 51 "MPEG-1/2 Layer II",
52 "MPEG-1/2 Layer III", 52 "MPEG-1/2 Layer III",
@@ -54,7 +54,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
54 "AC-3", 54 "AC-3",
55 NULL 55 NULL
56 }; 56 };
57 static const char *mpeg_audio_l1_bitrate[] = { 57 static const char * const mpeg_audio_l1_bitrate[] = {
58 "32 kbps", 58 "32 kbps",
59 "64 kbps", 59 "64 kbps",
60 "96 kbps", 60 "96 kbps",
@@ -71,7 +71,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
71 "448 kbps", 71 "448 kbps",
72 NULL 72 NULL
73 }; 73 };
74 static const char *mpeg_audio_l2_bitrate[] = { 74 static const char * const mpeg_audio_l2_bitrate[] = {
75 "32 kbps", 75 "32 kbps",
76 "48 kbps", 76 "48 kbps",
77 "56 kbps", 77 "56 kbps",
@@ -88,7 +88,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
88 "384 kbps", 88 "384 kbps",
89 NULL 89 NULL
90 }; 90 };
91 static const char *mpeg_audio_l3_bitrate[] = { 91 static const char * const mpeg_audio_l3_bitrate[] = {
92 "32 kbps", 92 "32 kbps",
93 "40 kbps", 93 "40 kbps",
94 "48 kbps", 94 "48 kbps",
@@ -105,7 +105,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
105 "320 kbps", 105 "320 kbps",
106 NULL 106 NULL
107 }; 107 };
108 static const char *mpeg_audio_ac3_bitrate[] = { 108 static const char * const mpeg_audio_ac3_bitrate[] = {
109 "32 kbps", 109 "32 kbps",
110 "40 kbps", 110 "40 kbps",
111 "48 kbps", 111 "48 kbps",
@@ -127,50 +127,50 @@ const char **v4l2_ctrl_get_menu(u32 id)
127 "640 kbps", 127 "640 kbps",
128 NULL 128 NULL
129 }; 129 };
130 static const char *mpeg_audio_mode[] = { 130 static const char * const mpeg_audio_mode[] = {
131 "Stereo", 131 "Stereo",
132 "Joint Stereo", 132 "Joint Stereo",
133 "Dual", 133 "Dual",
134 "Mono", 134 "Mono",
135 NULL 135 NULL
136 }; 136 };
137 static const char *mpeg_audio_mode_extension[] = { 137 static const char * const mpeg_audio_mode_extension[] = {
138 "Bound 4", 138 "Bound 4",
139 "Bound 8", 139 "Bound 8",
140 "Bound 12", 140 "Bound 12",
141 "Bound 16", 141 "Bound 16",
142 NULL 142 NULL
143 }; 143 };
144 static const char *mpeg_audio_emphasis[] = { 144 static const char * const mpeg_audio_emphasis[] = {
145 "No Emphasis", 145 "No Emphasis",
146 "50/15 us", 146 "50/15 us",
147 "CCITT J17", 147 "CCITT J17",
148 NULL 148 NULL
149 }; 149 };
150 static const char *mpeg_audio_crc[] = { 150 static const char * const mpeg_audio_crc[] = {
151 "No CRC", 151 "No CRC",
152 "16-bit CRC", 152 "16-bit CRC",
153 NULL 153 NULL
154 }; 154 };
155 static const char *mpeg_video_encoding[] = { 155 static const char * const mpeg_video_encoding[] = {
156 "MPEG-1", 156 "MPEG-1",
157 "MPEG-2", 157 "MPEG-2",
158 "MPEG-4 AVC", 158 "MPEG-4 AVC",
159 NULL 159 NULL
160 }; 160 };
161 static const char *mpeg_video_aspect[] = { 161 static const char * const mpeg_video_aspect[] = {
162 "1x1", 162 "1x1",
163 "4x3", 163 "4x3",
164 "16x9", 164 "16x9",
165 "2.21x1", 165 "2.21x1",
166 NULL 166 NULL
167 }; 167 };
168 static const char *mpeg_video_bitrate_mode[] = { 168 static const char * const mpeg_video_bitrate_mode[] = {
169 "Variable Bitrate", 169 "Variable Bitrate",
170 "Constant Bitrate", 170 "Constant Bitrate",
171 NULL 171 NULL
172 }; 172 };
173 static const char *mpeg_stream_type[] = { 173 static const char * const mpeg_stream_type[] = {
174 "MPEG-2 Program Stream", 174 "MPEG-2 Program Stream",
175 "MPEG-2 Transport Stream", 175 "MPEG-2 Transport Stream",
176 "MPEG-1 System Stream", 176 "MPEG-1 System Stream",
@@ -179,25 +179,25 @@ const char **v4l2_ctrl_get_menu(u32 id)
179 "MPEG-2 SVCD-compatible Stream", 179 "MPEG-2 SVCD-compatible Stream",
180 NULL 180 NULL
181 }; 181 };
182 static const char *mpeg_stream_vbi_fmt[] = { 182 static const char * const mpeg_stream_vbi_fmt[] = {
183 "No VBI", 183 "No VBI",
184 "Private packet, IVTV format", 184 "Private packet, IVTV format",
185 NULL 185 NULL
186 }; 186 };
187 static const char *camera_power_line_frequency[] = { 187 static const char * const camera_power_line_frequency[] = {
188 "Disabled", 188 "Disabled",
189 "50 Hz", 189 "50 Hz",
190 "60 Hz", 190 "60 Hz",
191 NULL 191 NULL
192 }; 192 };
193 static const char *camera_exposure_auto[] = { 193 static const char * const camera_exposure_auto[] = {
194 "Auto Mode", 194 "Auto Mode",
195 "Manual Mode", 195 "Manual Mode",
196 "Shutter Priority Mode", 196 "Shutter Priority Mode",
197 "Aperture Priority Mode", 197 "Aperture Priority Mode",
198 NULL 198 NULL
199 }; 199 };
200 static const char *colorfx[] = { 200 static const char * const colorfx[] = {
201 "None", 201 "None",
202 "Black & White", 202 "Black & White",
203 "Sepia", 203 "Sepia",
@@ -210,7 +210,7 @@ const char **v4l2_ctrl_get_menu(u32 id)
210 "Vivid", 210 "Vivid",
211 NULL 211 NULL
212 }; 212 };
213 static const char *tune_preemphasis[] = { 213 static const char * const tune_preemphasis[] = {
214 "No preemphasis", 214 "No preemphasis",
215 "50 useconds", 215 "50 useconds",
216 "75 useconds", 216 "75 useconds",
@@ -952,7 +952,7 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
952 const struct v4l2_ctrl_ops *ops, 952 const struct v4l2_ctrl_ops *ops,
953 u32 id, const char *name, enum v4l2_ctrl_type type, 953 u32 id, const char *name, enum v4l2_ctrl_type type,
954 s32 min, s32 max, u32 step, s32 def, 954 s32 min, s32 max, u32 step, s32 def,
955 u32 flags, const char **qmenu, void *priv) 955 u32 flags, const char * const *qmenu, void *priv)
956{ 956{
957 struct v4l2_ctrl *ctrl; 957 struct v4l2_ctrl *ctrl;
958 unsigned sz_extra = 0; 958 unsigned sz_extra = 0;
@@ -1019,7 +1019,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl,
1019 bool is_menu; 1019 bool is_menu;
1020 struct v4l2_ctrl *ctrl; 1020 struct v4l2_ctrl *ctrl;
1021 const char *name = cfg->name; 1021 const char *name = cfg->name;
1022 const char **qmenu = cfg->qmenu; 1022 const char * const *qmenu = cfg->qmenu;
1023 enum v4l2_ctrl_type type = cfg->type; 1023 enum v4l2_ctrl_type type = cfg->type;
1024 u32 flags = cfg->flags; 1024 u32 flags = cfg->flags;
1025 s32 min = cfg->min; 1025 s32 min = cfg->min;
@@ -1075,7 +1075,7 @@ struct v4l2_ctrl *v4l2_ctrl_new_std_menu(struct v4l2_ctrl_handler *hdl,
1075 const struct v4l2_ctrl_ops *ops, 1075 const struct v4l2_ctrl_ops *ops,
1076 u32 id, s32 max, s32 mask, s32 def) 1076 u32 id, s32 max, s32 mask, s32 def)
1077{ 1077{
1078 const char **qmenu = v4l2_ctrl_get_menu(id); 1078 const char * const *qmenu = v4l2_ctrl_get_menu(id);
1079 const char *name; 1079 const char *name;
1080 enum v4l2_ctrl_type type; 1080 enum v4l2_ctrl_type type;
1081 s32 min; 1081 s32 min;