From: "Udo A. Steinberg" <udo@hypervisor.org>
To: mchehab@redhat.com, Darron Broad <darron@kewl.org>
Cc: v4l-dvb-maintainer@linuxtv.org, linux-media@vger.kernel.org
Subject: [PATCH] Allow the user to restrict the RC5 address
Date: Thu, 26 Mar 2009 03:34:53 +0100 [thread overview]
Message-ID: <20090326033453.7d90236d@laptop.hypervisor.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 1218 bytes --]
Mauro,
This patch allows users with multiple remotes to specify an RC5 address for a
remote from which key codes will be accepted. If no address is specified, the
default value of 0 accepts key codes from any remote. This replaces the current
hard-coded address checks, which are too restrictive.
Signed-off-by: Udo Steinberg <udo@hypervisor.org>
--- linux-2.6.29/drivers/media/video/ir-kbd-i2c.c 2009-03-24 00:12:14.000000000 +0100
+++ linux-2.6.29/drivers/media/video/ir-kbd-i2c.new 2009-03-26 03:12:11.000000000 +0100
@@ -58,6 +58,9 @@
module_param(hauppauge, int, 0644); /* Choose Hauppauge remote */
MODULE_PARM_DESC(hauppauge, "Specify Hauppauge remote: 0=black, 1=grey (defaults to 0)");
+static unsigned int device;
+module_param(device, uint, 0644); /* RC5 device address */
+MODULE_PARM_DESC(device, "Specify device address: 0=any (defaults to 0)");
#define DEVNAME "ir-kbd-i2c"
#define dprintk(level, fmt, arg...) if (debug >= level) \
@@ -104,8 +107,8 @@
/* invalid key press */
return 0;
- if (dev!=0x1e && dev!=0x1f)
- /* not a hauppauge remote */
+ if (device && device != dev)
+ /* not an acceptable remote */
return 0;
if (!range)
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
next reply other threads:[~2009-03-26 2:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-26 2:34 Udo A. Steinberg [this message]
2009-03-26 7:24 ` [PATCH] Allow the user to restrict the RC5 address Hans Verkuil
2009-03-26 16:45 ` Steven Toth
2009-03-26 18:45 ` Udo A. Steinberg
2009-03-27 7:28 ` [v4l-dvb-maintainer] " Hans Verkuil
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=20090326033453.7d90236d@laptop.hypervisor.org \
--to=udo@hypervisor.org \
--cc=darron@kewl.org \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@redhat.com \
--cc=v4l-dvb-maintainer@linuxtv.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.