diff options
author | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-28 14:25:28 -0300 |
---|---|---|
committer | Chanho Park <chanho61.park@samsung.com> | 2014-08-07 15:17:56 +0900 |
commit | 1042a606e771c8f1b75041c4a6b844e6ac4ba154 (patch) | |
tree | 79bcfb87453f7b037ab980d14e46ebb5ecc2e958 | |
parent | 2732e4689d7e9b7127e5e6307e69df8674734f18 (diff) | |
download | linux-3.10-1042a606e771c8f1b75041c4a6b844e6ac4ba154.tar.gz linux-3.10-1042a606e771c8f1b75041c4a6b844e6ac4ba154.tar.bz2 linux-3.10-1042a606e771c8f1b75041c4a6b844e6ac4ba154.zip |
upstream: [media] rc-main: allow raw protocol drivers to restrict the allowed protos
On some hardware (au0828/au8522), the hardware is broken with
regards to the initial pulse detection. So, the driver needs to
produce a fake start pulse. That limits the acceptable protocols,
as it is not possible to produce a fake pulse that would cover
all supported protocols.
So, allow the driver to explicitly set the allowed protocols.
If the driver doesn't specify, keep the old behavior.
Backports http://git.linuxtv.org/cgit.cgi/media_tree.git/commit/?id=d24b69fc6b0a
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
-rw-r--r-- | drivers/media/rc/rc-main.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/media/rc/rc-main.c b/drivers/media/rc/rc-main.c index ecbc20c4252..e4c8a0e7e14 100644 --- a/drivers/media/rc/rc-main.c +++ b/drivers/media/rc/rc-main.c @@ -860,9 +860,11 @@ static ssize_t show_protocols(struct device *device, if (dev->driver_type == RC_DRIVER_SCANCODE || fattr->type == RC_FILTER_WAKEUP) allowed = dev->allowed_protocols[fattr->type]; - else if (dev->raw) - allowed = ir_raw_get_allowed_protocols(); - else { + else if (dev->raw) { + allowed = dev->allowed_protocols[fattr->type]; + if (!allowed) + allowed = ir_raw_get_allowed_protocols(); + } else { mutex_unlock(&dev->lock); return -ENODEV; } |