aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2005-07-07 20:58:11 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2005-07-07 21:23:59 -0400
commitc9b06fa47e1c1ff8704461c7fd6a99e3621ba0e6 (patch)
treeb452edcee12a9435464b42688de2fc5ac2003a17 /drivers
parent22c6d93a73105fddd58796d7cb10f5f90ee2a338 (diff)
[PATCH] dvb: usb: add module parm to disable remote control polling
Add module parameter to deactive remote control polling. Signed-off-by: Patrick Boettcher <pb@linuxtv.org> Signed-off-by: Johannes Stezenbach <js@linuxtv.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-common.h1
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-init.c4
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-remote.c8
3 files changed, 12 insertions, 1 deletions
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-common.h b/drivers/media/dvb/dvb-usb/dvb-usb-common.h
index abf7d2f562b8..7300489d3e24 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-common.h
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-common.h
@@ -12,6 +12,7 @@
12#include "dvb-usb.h" 12#include "dvb-usb.h"
13 13
14extern int dvb_usb_debug; 14extern int dvb_usb_debug;
15extern int dvb_usb_disable_rc_polling;
15 16
16#define deb_info(args...) dprintk(dvb_usb_debug,0x01,args) 17#define deb_info(args...) dprintk(dvb_usb_debug,0x01,args)
17#define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args) 18#define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args)
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-init.c b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
index 3aadec974cf1..c3b3ae4f3ec7 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-init.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-init.c
@@ -18,6 +18,10 @@ int dvb_usb_debug;
18module_param_named(debug,dvb_usb_debug, int, 0644); 18module_param_named(debug,dvb_usb_debug, int, 0644);
19MODULE_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); 19MODULE_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);
20 20
21int dvb_usb_disable_rc_polling;
22module_param_named(disable_rc_polling, dvb_usb_disable_rc_polling, int, 0644);
23MODULE_PARM_DESC(disable_rc_polling, "disable remote control polling (default: 0).");
24
21/* general initialization functions */ 25/* general initialization functions */
22int dvb_usb_exit(struct dvb_usb_device *d) 26int dvb_usb_exit(struct dvb_usb_device *d)
23{ 27{
diff --git a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
index 9f1e23f82bae..f4038bf21c91 100644
--- a/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
+++ b/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
@@ -21,6 +21,10 @@ static void dvb_usb_read_remote_control(void *data)
21 /* TODO: need a lock here. We can simply skip checking for the remote control 21 /* TODO: need a lock here. We can simply skip checking for the remote control
22 if we're busy. */ 22 if we're busy. */
23 23
24 /* when the parameter has been set to 1 via sysfs while the driver was running */
25 if (dvb_usb_disable_rc_polling)
26 return;
27
24 if (d->props.rc_query(d,&event,&state)) { 28 if (d->props.rc_query(d,&event,&state)) {
25 err("error while querying for an remote control event."); 29 err("error while querying for an remote control event.");
26 goto schedule; 30 goto schedule;
@@ -85,7 +89,9 @@ schedule:
85int dvb_usb_remote_init(struct dvb_usb_device *d) 89int dvb_usb_remote_init(struct dvb_usb_device *d)
86{ 90{
87 int i; 91 int i;
88 if (d->props.rc_key_map == NULL) 92 if (d->props.rc_key_map == NULL ||
93 d->props.rc_query == NULL ||
94 dvb_usb_disable_rc_polling)
89 return 0; 95 return 0;
90 96
91 /* Initialise the remote-control structures.*/ 97 /* Initialise the remote-control structures.*/