Google
  Web www.spinics.net

[PATCH] Allow the user to restrict the RC5 address

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


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@xxxxxxxxxxxxxx>


--- 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: signature.asc
Description: PGP signature

_______________________________________________
v4l-dvb-maintainer mailing list
v4l-dvb-maintainer@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/v4l-dvb-maintainer

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [Linux USB]

-->
Add to Google Powered by Linux

Google PageRank Checking tool