From: Tomas Melin <tomas.melin@iki.fi>
To: m.chehab@samsung.com, david@hardeman.nu
Cc: james.hogan@imgtec.com, a.seppala@gmail.com,
linux-media@vger.kernel.org, linux-kernel@vger.kernel.org,
Tomas Melin <tomas.melin@iki.fi>
Subject: [PATCH 2/2] [media] rc-core: change enabled_protocol default setting
Date: Sun, 19 Oct 2014 13:21:53 +0300 [thread overview]
Message-ID: <1413714113-7456-2-git-send-email-tomas.melin@iki.fi> (raw)
In-Reply-To: <1413714113-7456-1-git-send-email-tomas.melin@iki.fi>
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@iki.fi>
---
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
next prev parent reply other threads:[~2014-10-19 10:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-19 10:21 [PATCH 1/2] [media] rc-core: fix protocol_change regression in ir_raw_event_register Tomas Melin
2014-10-19 10:21 ` Tomas Melin [this message]
2014-10-20 14:12 ` [PATCH 2/2] [media] rc-core: change enabled_protocol default setting David Härdeman
2014-10-21 17:44 ` Tomas Melin
2014-10-20 14:09 ` [PATCH 1/2] [media] rc-core: fix protocol_change regression in ir_raw_event_register David Härdeman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1413714113-7456-2-git-send-email-tomas.melin@iki.fi \
--to=tomas.melin@iki.fi \
--cc=a.seppala@gmail.com \
--cc=david@hardeman.nu \
--cc=james.hogan@imgtec.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@samsung.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®