LinuxTV Patchwork [3/7] media: v4l2-ctrl: fix flags for DO_WHITE_BALANCE

login
register
mail settings
Submitter Eugen Hristev
Date April 9, 2019, 11:07 a.m.
Message ID <1554807715-2353-4-git-send-email-eugen.hristev@microchip.com>
Download mbox | patch
Permalink /patch/55571/
State New
Delegated to: Hans Verkuil
Headers show

Comments

Eugen Hristev - April 9, 2019, 11:07 a.m.
From: Eugen Hristev <eugen.hristev@microchip.com>


Control DO_WHITE_BALANCE is a button, with read only and execute-on-write flags.
Adding this control in the proper list in the fill function.

After adding it here, we can see output of v4l2-ctl -L
do_white_balance 0x0098090d (button) : flags=write-only, execute-on-write

Signed-off-by: Eugen Hristev <eugen.hristev@microchip.com>

---
 drivers/media/v4l2-core/v4l2-ctrls.c | 1 +
 1 file changed, 1 insertion(+)

-- 
2.7.4

Patch

diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4l2-ctrls.c

index b79d3bb..dc32fb7 100644

--- a/drivers/media/v4l2-core/v4l2-ctrls.c

+++ b/drivers/media/v4l2-core/v4l2-ctrls.c

@@ -1150,6 +1150,7 @@  void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,

 	case V4L2_CID_FLASH_STROBE_STOP:
 	case V4L2_CID_AUTO_FOCUS_START:
 	case V4L2_CID_AUTO_FOCUS_STOP:
+	case V4L2_CID_DO_WHITE_BALANCE:

 		*type = V4L2_CTRL_TYPE_BUTTON;
 		*flags |= V4L2_CTRL_FLAG_WRITE_ONLY |
 			  V4L2_CTRL_FLAG_EXECUTE_ON_WRITE;

Privacy Policy