summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb
diff options
context:
space:
mode:
authorPatrick Boettcher <devnull@localhost>2005-06-24 10:43:07 +0000
committerPatrick Boettcher <devnull@localhost>2005-06-24 10:43:07 +0000
commitdf540f7b9569876e55959460d4b8e0e55247b743 (patch)
tree003da11bc147574f2cf075836daec7af200a145f /linux/drivers/media/dvb/dvb-usb
parent1bd89e3703792e73cb12287c50fee948eb52e646 (diff)
downloadmediapointer-dvb-s2-df540f7b9569876e55959460d4b8e0e55247b743.tar.gz
mediapointer-dvb-s2-df540f7b9569876e55959460d4b8e0e55247b743.tar.bz2
fixed usage of the correct number of events in keymapping-array
better place for return added initialization of global variables Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c4
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c6
2 files changed, 5 insertions, 5 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index c3b3ae4f3..4a8cd57e5 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -14,11 +14,11 @@
#include "dvb-usb-common.h"
/* debug */
-int dvb_usb_debug;
+int dvb_usb_debug = 0;
module_param_named(debug,dvb_usb_debug, int, 0644);
MODULE_PARM_DESC(debug, "set debugging level (1=info,xfer=2,pll=4,ts=8,err=16,rc=32,fw=64 (or-able))." DVB_USB_DEBUG_STATUS);
-int dvb_usb_disable_rc_polling;
+int dvb_usb_disable_rc_polling = 0;
module_param_named(disable_rc_polling, dvb_usb_disable_rc_polling, int, 0644);
MODULE_PARM_DESC(disable_rc_polling, "disable remote control polling (default: 0).");
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index f4038bf21..fc7800f17 100644
--- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -39,7 +39,7 @@ static void dvb_usb_read_remote_control(void *data)
d->last_event = event;
case REMOTE_KEY_REPEAT:
deb_rc("key repeated\n");
- input_event(&d->rc_input_dev, EV_KEY, event, 1);
+ input_event(&d->rc_input_dev, EV_KEY, d->last_event, 1);
input_event(&d->rc_input_dev, EV_KEY, d->last_event, 0);
input_sync(&d->rc_input_dev);
break;
@@ -160,12 +160,12 @@ int dvb_usb_nec_rc_key_to_event(struct dvb_usb_device *d,
break;
}
/* See if we can match the raw key code. */
- for (i = 0; i < sizeof(keymap)/sizeof(struct dvb_usb_rc_key); i++)
+ for (i = 0; i < d->props.rc_key_map_size; i++)
if (keymap[i].custom == keybuf[1] &&
keymap[i].data == keybuf[3]) {
*event = keymap[i].event;
*state = REMOTE_KEY_PRESSED;
- break;
+ return 0;
}
deb_err("key mapping failed - no appropriate key found in keymapping\n");
break;