diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/media/radio/radio-wl1273.c | 2 | ||||
-rw-r--r-- | drivers/media/radio/wl128x/fmdrv_v4l2.c | 2 | ||||
-rw-r--r-- | drivers/media/video/adp1653.c | 2 | ||||
-rw-r--r-- | drivers/media/video/pwc/pwc-v4l.c | 10 | ||||
-rw-r--r-- | drivers/media/video/s5p-mfc/s5p_mfc_dec.c | 4 | ||||
-rw-r--r-- | drivers/media/video/s5p-mfc/s5p_mfc_enc.c | 2 | ||||
-rw-r--r-- | drivers/media/video/saa7115.c | 2 | ||||
-rw-r--r-- | drivers/media/video/v4l2-ctrls.c | 36 |
8 files changed, 29 insertions, 31 deletions
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 46cacf845049..6d1e4e750f63 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
@@ -2109,7 +2109,7 @@ static int __devinit wl1273_fm_radio_probe(struct platform_device *pdev) | |||
2109 | V4L2_CID_TUNE_ANTENNA_CAPACITOR, | 2109 | V4L2_CID_TUNE_ANTENNA_CAPACITOR, |
2110 | 0, 255, 1, 255); | 2110 | 0, 255, 1, 255); |
2111 | if (ctrl) | 2111 | if (ctrl) |
2112 | ctrl->is_volatile = 1; | 2112 | ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; |
2113 | 2113 | ||
2114 | if (radio->ctrl_handler.error) { | 2114 | if (radio->ctrl_handler.error) { |
2115 | r = radio->ctrl_handler.error; | 2115 | r = radio->ctrl_handler.error; |
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c index 478d1e93ada6..aaee74752a85 100644 --- a/drivers/media/radio/wl128x/fmdrv_v4l2.c +++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c | |||
@@ -559,7 +559,7 @@ int fm_v4l2_init_video_device(struct fmdev *fmdev, int radio_nr) | |||
559 | 255, 1, 255); | 559 | 255, 1, 255); |
560 | 560 | ||
561 | if (ctrl) | 561 | if (ctrl) |
562 | ctrl->is_volatile = 1; | 562 | ctrl->flags |= V4L2_CTRL_FLAG_VOLATILE; |
563 | 563 | ||
564 | return 0; | 564 | return 0; |
565 | } | 565 | } |
diff --git a/drivers/media/video/adp1653.c b/drivers/media/video/adp1653.c index 279d75d38188..d0e8ac1f9cde 100644 --- a/drivers/media/video/adp1653.c +++ b/drivers/media/video/adp1653.c | |||
@@ -258,7 +258,7 @@ static int adp1653_init_controls(struct adp1653_flash *flash) | |||
258 | if (flash->ctrls.error) | 258 | if (flash->ctrls.error) |
259 | return flash->ctrls.error; | 259 | return flash->ctrls.error; |
260 | 260 | ||
261 | fault->is_volatile = 1; | 261 | fault->flags |= V4L2_CTRL_FLAG_VOLATILE; |
262 | 262 | ||
263 | flash->subdev.ctrl_handler = &flash->ctrls; | 263 | flash->subdev.ctrl_handler = &flash->ctrls; |
264 | return 0; | 264 | return 0; |
diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index 8c70e64444e7..6873bf50869f 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c | |||
@@ -640,7 +640,7 @@ static int pwc_set_awb(struct pwc_device *pdev) | |||
640 | return ret; | 640 | return ret; |
641 | 641 | ||
642 | /* Update val when coming from auto or going to a preset */ | 642 | /* Update val when coming from auto or going to a preset */ |
643 | if (pdev->red_balance->is_volatile || | 643 | if ((pdev->red_balance->flags & V4L2_CTRL_FLAG_VOLATILE) || |
644 | pdev->auto_white_balance->val == awb_indoor || | 644 | pdev->auto_white_balance->val == awb_indoor || |
645 | pdev->auto_white_balance->val == awb_outdoor || | 645 | pdev->auto_white_balance->val == awb_outdoor || |
646 | pdev->auto_white_balance->val == awb_fl) { | 646 | pdev->auto_white_balance->val == awb_fl) { |
@@ -654,12 +654,12 @@ static int pwc_set_awb(struct pwc_device *pdev) | |||
654 | &pdev->blue_balance->val); | 654 | &pdev->blue_balance->val); |
655 | } | 655 | } |
656 | if (pdev->auto_white_balance->val == awb_auto) { | 656 | if (pdev->auto_white_balance->val == awb_auto) { |
657 | pdev->red_balance->is_volatile = true; | 657 | pdev->red_balance->flags |= V4L2_CTRL_FLAG_VOLATILE; |
658 | pdev->blue_balance->is_volatile = true; | 658 | pdev->blue_balance->flags |= V4L2_CTRL_FLAG_VOLATILE; |
659 | pdev->color_bal_valid = false; /* Force cache update */ | 659 | pdev->color_bal_valid = false; /* Force cache update */ |
660 | } else { | 660 | } else { |
661 | pdev->red_balance->is_volatile = false; | 661 | pdev->red_balance->flags &= ~V4L2_CTRL_FLAG_VOLATILE; |
662 | pdev->blue_balance->is_volatile = false; | 662 | pdev->blue_balance->flags &= ~V4L2_CTRL_FLAG_VOLATILE; |
663 | } | 663 | } |
664 | } | 664 | } |
665 | 665 | ||
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c b/drivers/media/video/s5p-mfc/s5p_mfc_dec.c index 32f898979809..bfbe08432050 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_dec.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_dec.c | |||
@@ -165,7 +165,7 @@ static struct mfc_control controls[] = { | |||
165 | .maximum = 32, | 165 | .maximum = 32, |
166 | .step = 1, | 166 | .step = 1, |
167 | .default_value = 1, | 167 | .default_value = 1, |
168 | .is_volatile = 1, | 168 | .flags = V4L2_CTRL_FLAG_VOLATILE, |
169 | }, | 169 | }, |
170 | }; | 170 | }; |
171 | 171 | ||
@@ -1020,7 +1020,7 @@ int s5p_mfc_dec_ctrls_setup(struct s5p_mfc_ctx *ctx) | |||
1020 | return ctx->ctrl_handler.error; | 1020 | return ctx->ctrl_handler.error; |
1021 | } | 1021 | } |
1022 | if (controls[i].is_volatile && ctx->ctrls[i]) | 1022 | if (controls[i].is_volatile && ctx->ctrls[i]) |
1023 | ctx->ctrls[i]->is_volatile = 1; | 1023 | ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE; |
1024 | } | 1024 | } |
1025 | return 0; | 1025 | return 0; |
1026 | } | 1026 | } |
diff --git a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c index 14ddbd26ebf4..4c90e53bd964 100644 --- a/drivers/media/video/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/video/s5p-mfc/s5p_mfc_enc.c | |||
@@ -1814,7 +1814,7 @@ int s5p_mfc_enc_ctrls_setup(struct s5p_mfc_ctx *ctx) | |||
1814 | return ctx->ctrl_handler.error; | 1814 | return ctx->ctrl_handler.error; |
1815 | } | 1815 | } |
1816 | if (controls[i].is_volatile && ctx->ctrls[i]) | 1816 | if (controls[i].is_volatile && ctx->ctrls[i]) |
1817 | ctx->ctrls[i]->is_volatile = 1; | 1817 | ctx->ctrls[i]->flags |= V4L2_CTRL_FLAG_VOLATILE; |
1818 | } | 1818 | } |
1819 | return 0; | 1819 | return 0; |
1820 | } | 1820 | } |
diff --git a/drivers/media/video/saa7115.c b/drivers/media/video/saa7115.c index f2ae405c74ac..e443d0d54f8f 100644 --- a/drivers/media/video/saa7115.c +++ b/drivers/media/video/saa7115.c | |||
@@ -1601,7 +1601,7 @@ static int saa711x_probe(struct i2c_client *client, | |||
1601 | V4L2_CID_CHROMA_AGC, 0, 1, 1, 1); | 1601 | V4L2_CID_CHROMA_AGC, 0, 1, 1, 1); |
1602 | state->gain = v4l2_ctrl_new_std(hdl, &saa711x_ctrl_ops, | 1602 | state->gain = v4l2_ctrl_new_std(hdl, &saa711x_ctrl_ops, |
1603 | V4L2_CID_CHROMA_GAIN, 0, 127, 1, 40); | 1603 | V4L2_CID_CHROMA_GAIN, 0, 127, 1, 40); |
1604 | state->gain->is_volatile = 1; | 1604 | state->gain->flags |= V4L2_CTRL_FLAG_VOLATILE; |
1605 | sd->ctrl_handler = hdl; | 1605 | sd->ctrl_handler = hdl; |
1606 | if (hdl->error) { | 1606 | if (hdl->error) { |
1607 | int err = hdl->error; | 1607 | int err = hdl->error; |
diff --git a/drivers/media/video/v4l2-ctrls.c b/drivers/media/video/v4l2-ctrls.c index 06b6014d4fb4..166762182f8e 100644 --- a/drivers/media/video/v4l2-ctrls.c +++ b/drivers/media/video/v4l2-ctrls.c | |||
@@ -43,7 +43,7 @@ struct v4l2_ctrl_helper { | |||
43 | }; | 43 | }; |
44 | 44 | ||
45 | /* Small helper function to determine if the autocluster is set to manual | 45 | /* Small helper function to determine if the autocluster is set to manual |
46 | mode. In that case the is_volatile flag should be ignored. */ | 46 | mode. */ |
47 | static bool is_cur_manual(const struct v4l2_ctrl *master) | 47 | static bool is_cur_manual(const struct v4l2_ctrl *master) |
48 | { | 48 | { |
49 | return master->is_auto && master->cur.val == master->manual_mode_value; | 49 | return master->is_auto && master->cur.val == master->manual_mode_value; |
@@ -1394,10 +1394,8 @@ struct v4l2_ctrl *v4l2_ctrl_new_custom(struct v4l2_ctrl_handler *hdl, | |||
1394 | type, min, max, | 1394 | type, min, max, |
1395 | is_menu ? cfg->menu_skip_mask : step, | 1395 | is_menu ? cfg->menu_skip_mask : step, |
1396 | def, flags, qmenu, priv); | 1396 | def, flags, qmenu, priv); |
1397 | if (ctrl) { | 1397 | if (ctrl) |
1398 | ctrl->is_private = cfg->is_private; | 1398 | ctrl->is_private = cfg->is_private; |
1399 | ctrl->is_volatile = cfg->is_volatile; | ||
1400 | } | ||
1401 | return ctrl; | 1399 | return ctrl; |
1402 | } | 1400 | } |
1403 | EXPORT_SYMBOL(v4l2_ctrl_new_custom); | 1401 | EXPORT_SYMBOL(v4l2_ctrl_new_custom); |
@@ -1519,12 +1517,12 @@ void v4l2_ctrl_auto_cluster(unsigned ncontrols, struct v4l2_ctrl **controls, | |||
1519 | master->manual_mode_value = manual_val; | 1517 | master->manual_mode_value = manual_val; |
1520 | master->flags |= V4L2_CTRL_FLAG_UPDATE; | 1518 | master->flags |= V4L2_CTRL_FLAG_UPDATE; |
1521 | flag = is_cur_manual(master) ? 0 : V4L2_CTRL_FLAG_INACTIVE; | 1519 | flag = is_cur_manual(master) ? 0 : V4L2_CTRL_FLAG_INACTIVE; |
1520 | if (set_volatile) | ||
1521 | flag |= V4L2_CTRL_FLAG_VOLATILE; | ||
1522 | 1522 | ||
1523 | for (i = 1; i < ncontrols; i++) | 1523 | for (i = 1; i < ncontrols; i++) |
1524 | if (controls[i]) { | 1524 | if (controls[i]) |
1525 | controls[i]->is_volatile = set_volatile; | ||
1526 | controls[i]->flags |= flag; | 1525 | controls[i]->flags |= flag; |
1527 | } | ||
1528 | } | 1526 | } |
1529 | EXPORT_SYMBOL(v4l2_ctrl_auto_cluster); | 1527 | EXPORT_SYMBOL(v4l2_ctrl_auto_cluster); |
1530 | 1528 | ||
@@ -1579,9 +1577,6 @@ EXPORT_SYMBOL(v4l2_ctrl_grab); | |||
1579 | static void log_ctrl(const struct v4l2_ctrl *ctrl, | 1577 | static void log_ctrl(const struct v4l2_ctrl *ctrl, |
1580 | const char *prefix, const char *colon) | 1578 | const char *prefix, const char *colon) |
1581 | { | 1579 | { |
1582 | int fl_inact = ctrl->flags & V4L2_CTRL_FLAG_INACTIVE; | ||
1583 | int fl_grabbed = ctrl->flags & V4L2_CTRL_FLAG_GRABBED; | ||
1584 | |||
1585 | if (ctrl->flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_WRITE_ONLY)) | 1580 | if (ctrl->flags & (V4L2_CTRL_FLAG_DISABLED | V4L2_CTRL_FLAG_WRITE_ONLY)) |
1586 | return; | 1581 | return; |
1587 | if (ctrl->type == V4L2_CTRL_TYPE_CTRL_CLASS) | 1582 | if (ctrl->type == V4L2_CTRL_TYPE_CTRL_CLASS) |
@@ -1612,14 +1607,17 @@ static void log_ctrl(const struct v4l2_ctrl *ctrl, | |||
1612 | printk(KERN_CONT "unknown type %d", ctrl->type); | 1607 | printk(KERN_CONT "unknown type %d", ctrl->type); |
1613 | break; | 1608 | break; |
1614 | } | 1609 | } |
1615 | if (fl_inact && fl_grabbed) | 1610 | if (ctrl->flags & (V4L2_CTRL_FLAG_INACTIVE | |
1616 | printk(KERN_CONT " (inactive, grabbed)\n"); | 1611 | V4L2_CTRL_FLAG_GRABBED | |
1617 | else if (fl_inact) | 1612 | V4L2_CTRL_FLAG_VOLATILE)) { |
1618 | printk(KERN_CONT " (inactive)\n"); | 1613 | if (ctrl->flags & V4L2_CTRL_FLAG_INACTIVE) |
1619 | else if (fl_grabbed) | 1614 | printk(KERN_CONT " inactive"); |
1620 | printk(KERN_CONT " (grabbed)\n"); | 1615 | if (ctrl->flags & V4L2_CTRL_FLAG_GRABBED) |
1621 | else | 1616 | printk(KERN_CONT " grabbed"); |
1622 | printk(KERN_CONT "\n"); | 1617 | if (ctrl->flags & V4L2_CTRL_FLAG_VOLATILE) |
1618 | printk(KERN_CONT " volatile"); | ||
1619 | } | ||
1620 | printk(KERN_CONT "\n"); | ||
1623 | } | 1621 | } |
1624 | 1622 | ||
1625 | /* Log all controls owned by the handler */ | 1623 | /* Log all controls owned by the handler */ |
@@ -2004,7 +2002,7 @@ static int get_ctrl(struct v4l2_ctrl *ctrl, s32 *val) | |||
2004 | 2002 | ||
2005 | v4l2_ctrl_lock(master); | 2003 | v4l2_ctrl_lock(master); |
2006 | /* g_volatile_ctrl will update the current control values */ | 2004 | /* g_volatile_ctrl will update the current control values */ |
2007 | if (ctrl->is_volatile && !is_cur_manual(master)) { | 2005 | if ((ctrl->flags & V4L2_CTRL_FLAG_VOLATILE) && !is_cur_manual(master)) { |
2008 | for (i = 0; i < master->ncontrols; i++) | 2006 | for (i = 0; i < master->ncontrols; i++) |
2009 | cur_to_new(master->cluster[i]); | 2007 | cur_to_new(master->cluster[i]); |
2010 | ret = call_op(master, g_volatile_ctrl); | 2008 | ret = call_op(master, g_volatile_ctrl); |