aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/gspca/t613.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/gspca/t613.c')
-rw-r--r--drivers/media/video/gspca/t613.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/media/video/gspca/t613.c b/drivers/media/video/gspca/t613.c
index a3eccd815766..7e762d551099 100644
--- a/drivers/media/video/gspca/t613.c
+++ b/drivers/media/video/gspca/t613.c
@@ -92,8 +92,6 @@ static int sd_setmirror(struct gspca_dev *gspca_dev, __s32 val);
92static int sd_getmirror(struct gspca_dev *gspca_dev, __s32 *val); 92static int sd_getmirror(struct gspca_dev *gspca_dev, __s32 *val);
93static int sd_seteffect(struct gspca_dev *gspca_dev, __s32 val); 93static int sd_seteffect(struct gspca_dev *gspca_dev, __s32 val);
94static int sd_geteffect(struct gspca_dev *gspca_dev, __s32 *val); 94static int sd_geteffect(struct gspca_dev *gspca_dev, __s32 *val);
95static int sd_querymenu(struct gspca_dev *gspca_dev,
96 struct v4l2_querymenu *menu);
97 95
98static const struct ctrl sd_ctrls[] = { 96static const struct ctrl sd_ctrls[] = {
99 { 97 {
@@ -1379,17 +1377,14 @@ static int sd_getlowlight(struct gspca_dev *gspca_dev, __s32 *val)
1379static int sd_querymenu(struct gspca_dev *gspca_dev, 1377static int sd_querymenu(struct gspca_dev *gspca_dev,
1380 struct v4l2_querymenu *menu) 1378 struct v4l2_querymenu *menu)
1381{ 1379{
1380 static const char *freq_nm[3] = {"NoFliker", "50 Hz", "60 Hz"};
1381
1382 switch (menu->id) { 1382 switch (menu->id) {
1383 case V4L2_CID_POWER_LINE_FREQUENCY: 1383 case V4L2_CID_POWER_LINE_FREQUENCY:
1384 switch (menu->index) { 1384 if ((unsigned) menu->index >= ARRAY_SIZE(freq_nm))
1385 case 1: /* V4L2_CID_POWER_LINE_FREQUENCY_50HZ */ 1385 break;
1386 strcpy((char *) menu->name, "50 Hz"); 1386 strcpy((char *) menu->name, freq_nm[menu->index]);
1387 return 0; 1387 return 0;
1388 case 2: /* V4L2_CID_POWER_LINE_FREQUENCY_60HZ */
1389 strcpy((char *) menu->name, "60 Hz");
1390 return 0;
1391 }
1392 break;
1393 case V4L2_CID_EFFECTS: 1388 case V4L2_CID_EFFECTS:
1394 if ((unsigned) menu->index < ARRAY_SIZE(effects_control)) { 1389 if ((unsigned) menu->index < ARRAY_SIZE(effects_control)) {
1395 strncpy((char *) menu->name, 1390 strncpy((char *) menu->name,