[media] v4l2-ctrls: use ptrs for all but the s32 type

Rather than having two unions for all types just keep 'val' and
'cur.val' and use the p_cur and p_new unions to access all others.

The only reason for keeping 'val' and 'cur.val' is that it is used
all over, so converting this as well would be a huge job.

Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Hans Verkuil 2014-04-27 03:38:13 -03:00 • committed by Mauro Carvalho Chehab
commit 2a9ec37311
9 changed files with 22 additions and 28 deletions

View file

@ -362,7 +362,7 @@ will result in a deadlock since these helpers lock the handler as well.
You can also take the handler lock yourself:
mutex_lock(&state->ctrl_handler.lock);
printk(KERN_INFO "String value is '%s'\n", ctrl1->cur.string);
pr_info("String value is '%s'\n", ctrl1->p_cur.p_char);
printk(KERN_INFO "Integer value is '%s'\n", ctrl2->cur.val);
mutex_unlock(&state->ctrl_handler.lock);