diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2010-12-29 12:25:52 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2010-12-30 05:02:14 -0500 |
commit | 513521eaee4375a1a0da0b73c7131a165a9fe4d9 (patch) | |
tree | 352f8d9053c1dd6d6866f13feed818bb24934f4a /drivers/media/video/pvrusb2 | |
parent | 6d6a48e51fd3bcb40c5b88d0f9690ba960eedfd2 (diff) |
[media] v4l2-ctrls: use const char * const * for the menu arrays
This prevents checkpatch warnings generated when defining
'static const char *foo[]' arrays. It makes sense to use
const char * const * anyway since the pointers in the array
are indeed const.
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/pvrusb2')
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-ctrl.c | 6 | ||||
-rw-r--r-- | drivers/media/video/pvrusb2/pvrusb2-hdw-internal.h | 2 |
2 files changed, 4 insertions, 4 deletions
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 | ||
368 | static int parse_token(const char *ptr,unsigned int len, | 368 | static 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 */ |