Re: [PATCH 4/4] dvbsky: add option to disable IR receiver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On 10/12/2014 01:03 PM, Olli Salonen wrote:
Added an option disable_rc that can be used to disable the IR receiver polling for this module.

Signed-off-by: Olli Salonen <olli.salonen@xxxxxx>
---
  drivers/media/usb/dvb-usb-v2/dvbsky.c | 10 +++++++++-
  1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c
index 5c7387a..71a3324 100644
--- a/drivers/media/usb/dvb-usb-v2/dvbsky.c
+++ b/drivers/media/usb/dvb-usb-v2/dvbsky.c
@@ -25,6 +25,10 @@
  #define DVBSKY_MSG_DELAY	0/*2000*/
  #define DVBSKY_BUF_LEN	64

+static int dvb_usb_dvbsky_disable_rc;
+module_param_named(disable_rc, dvb_usb_dvbsky_disable_rc, int, 0644);
+MODULE_PARM_DESC(disable_rc, "Disable inbuilt IR receiver.");
+
  DVB_DEFINE_MOD_OPT_ADAPTER_NR(adapter_nr);

  struct dvbsky_state {
@@ -218,6 +222,10 @@ static int dvbsky_rc_query(struct dvb_usb_device *d)

  static int dvbsky_get_rc_config(struct dvb_usb_device *d, struct dvb_usb_rc *rc)
  {
+	if (dvb_usb_dvbsky_disable_rc)
+		return 0;
+
+	rc->map_name       = RC_MAP_DVBSKY;
  	rc->allowed_protos = RC_BIT_RC5;
  	rc->query          = dvbsky_rc_query;
  	rc->interval       = 300;
@@ -450,7 +458,7 @@ static struct dvb_usb_device_properties dvbsky_s960_props = {

  static const struct usb_device_id dvbsky_id_table[] = {
  	{ DVB_USB_DEVICE(0x0572, 0x6831,
-		&dvbsky_s960_props, "DVBSky S960/S860", RC_MAP_DVBSKY) },
+		&dvbsky_s960_props, "DVBSky S960/S860", NULL) },

Why you removed default keytable too?

  	{ }
  };
  MODULE_DEVICE_TABLE(usb, dvbsky_id_table);


--
http://palosaari.fi/
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux