projects
/
platform
/
upstream
/
v4l-utils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
db13b6f
)
keytable: Mask selected protocols with the supported ones
author
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Sat, 26 Jul 2014 02:02:00 +0000
(23:02 -0300)
committer
Mauro Carvalho Chehab
<m.chehab@samsung.com>
Sat, 26 Jul 2014 02:02:00 +0000
(23:02 -0300)
It should never try to enable a protocol not supported, as
the Kernel will give an error and reset to none.
That's a problem when -p all option is used. So, mask the
protocols to make this option to work.
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
utils/keytable/keytable.c
patch
|
blob
|
history
diff --git
a/utils/keytable/keytable.c
b/utils/keytable/keytable.c
index
6a8deee
..
1a91fba
100644
(file)
--- a/
utils/keytable/keytable.c
+++ b/
utils/keytable/keytable.c
@@
-1174,6
+1174,12
@@
static int set_proto(struct rc_device *rc_dev)
{
int rc = 0;
+ rc_dev->current &= rc_dev->supported;
+ if (!rc_dev->current) {
+ fprintf(stderr, "Invalid protocols selected\n");
+ return EINVAL;
+ }
+
if (rc_dev->version == VERSION_2) {
rc = v2_set_protocols(rc_dev);
return rc;