Commit c9b06fa4 authored by Patrick Boettcher's avatar Patrick Boettcher Committed by Linus Torvalds

[PATCH] dvb: usb: add module parm to disable remote control polling

Add module parameter to deactive remote control polling.
Signed-off-by: default avatarPatrick Boettcher <pb@linuxtv.org>
Signed-off-by: default avatarJohannes Stezenbach <js@linuxtv.org>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 22c6d93a
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
#include "dvb-usb.h" #include "dvb-usb.h"
extern int dvb_usb_debug; extern int dvb_usb_debug;
extern int dvb_usb_disable_rc_polling;
#define deb_info(args...) dprintk(dvb_usb_debug,0x01,args) #define deb_info(args...) dprintk(dvb_usb_debug,0x01,args)
#define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args) #define deb_xfer(args...) dprintk(dvb_usb_debug,0x02,args)
......
...@@ -18,6 +18,10 @@ int dvb_usb_debug; ...@@ -18,6 +18,10 @@ int dvb_usb_debug;
module_param_named(debug,dvb_usb_debug, int, 0644); 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); 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 */ /* general initialization functions */
int dvb_usb_exit(struct dvb_usb_device *d) int dvb_usb_exit(struct dvb_usb_device *d)
{ {
......
...@@ -21,6 +21,10 @@ static void dvb_usb_read_remote_control(void *data) ...@@ -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 /* TODO: need a lock here. We can simply skip checking for the remote control
if we're busy. */ 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)) { if (d->props.rc_query(d,&event,&state)) {
err("error while querying for an remote control event."); err("error while querying for an remote control event.");
goto schedule; goto schedule;
...@@ -85,7 +89,9 @@ schedule: ...@@ -85,7 +89,9 @@ schedule:
int dvb_usb_remote_init(struct dvb_usb_device *d) int dvb_usb_remote_init(struct dvb_usb_device *d)
{ {
int i; 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; return 0;
/* Initialise the remote-control structures.*/ /* Initialise the remote-control structures.*/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment