[PATCH 2/2] [media] rc-core: change enabled_protocol default setting
From: Tomas Melin
Date: Sun Oct 19 2014 - 06:22:48 EST
Change default setting for enabled protocols.
Instead of enabling all protocols, disable all except lirc during registration.
Reduces overhead since all protocols not handled by default.
Protocol to use will be enabled when keycode table is written by userspace.
Signed-off-by: Tomas Melin <tomas.melin@xxxxxx>
---
drivers/media/rc/rc-ir-raw.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/media/rc/rc-ir-raw.c b/drivers/media/rc/rc-ir-raw.c
index a118539..63d23d0 100644
--- a/drivers/media/rc/rc-ir-raw.c
+++ b/drivers/media/rc/rc-ir-raw.c
@@ -256,7 +256,8 @@ int ir_raw_event_register(struct rc_dev *dev)
return -ENOMEM;
dev->raw->dev = dev;
- dev->enabled_protocols = ~0;
+ /* by default, disable all but lirc*/
+ dev->enabled_protocols = RC_BIT_LIRC;
rc = kfifo_alloc(&dev->raw->kfifo,
sizeof(struct ir_raw_event) * MAX_IR_EVENT_SIZE,
GFP_KERNEL);
--
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/