diff options
author | Patrick Boettcher <devnull@localhost> | 2005-06-06 22:44:15 +0000 |
---|---|---|
committer | Patrick Boettcher <devnull@localhost> | 2005-06-06 22:44:15 +0000 |
commit | 14449c0f3cd6619ac209bd440dd03e4aad3ead26 (patch) | |
tree | a8bba9e12cfd1552103978b05b1affadfff47164 /linux/drivers | |
parent | 09cd5f28c1bcb6cfae3af6b83c0cb56b6773306e (diff) | |
download | mediapointer-dvb-s2-14449c0f3cd6619ac209bd440dd03e4aad3ead26.tar.gz mediapointer-dvb-s2-14449c0f3cd6619ac209bd440dd03e4aad3ead26.tar.bz2 |
added module parameter to deactive remote control polling.
Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers')
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h | 1 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c | 8 |
3 files changed, 12 insertions, 1 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h b/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h index abf7d2f56..7300489d3 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-common.h @@ -12,6 +12,7 @@ #include "dvb-usb.h" extern int dvb_usb_debug; +extern int dvb_usb_disable_rc_polling; #define deb_info(args...) dprintk(dvb_usb_debug,0x01,args) #define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args) 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 3aadec974..c3b3ae4f3 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-init.c @@ -18,6 +18,10 @@ int dvb_usb_debug; 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; +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)."); + /* general initialization functions */ int dvb_usb_exit(struct dvb_usb_device *d) { 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 9f1e23f82..f4038bf21 100644 --- a/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c +++ b/linux/drivers/media/dvb/dvb-usb/dvb-usb-remote.c @@ -21,6 +21,10 @@ static void dvb_usb_read_remote_control(void *data) /* TODO: need a lock here. We can simply skip checking for the remote control if we're busy. */ + /* when the parameter has been set to 1 via sysfs while the driver was running */ + if (dvb_usb_disable_rc_polling) + return; + if (d->props.rc_query(d,&event,&state)) { err("error while querying for an remote control event."); goto schedule; @@ -85,7 +89,9 @@ schedule: int dvb_usb_remote_init(struct dvb_usb_device *d) { int i; - if (d->props.rc_key_map == NULL) + if (d->props.rc_key_map == NULL || + d->props.rc_query == NULL || + dvb_usb_disable_rc_polling) return 0; /* Initialise the remote-control structures.*/ |