aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb/dvb-usb/dvb-usb-remote.c
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/media/dvb/dvb-usb/dvb-usb-remote.c
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/media/dvb/dvb-usb/dvb-usb-remote.c')
-rw-r--r--drivers/media/dvb/dvb-usb/dvb-usb-remote.c8
1 files changed, 7 insertions, 1 deletions
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.*/