[media] au0828: add an option to disable IR via modprobe parameter
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 7 Aug 2014 16:10:25 +0000 (13:10 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Thu, 21 Aug 2014 20:25:05 +0000 (15:25 -0500)
The IR code increases the power consumption of the device.
Allow to disable it via modprobe parameter.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/usb/au0828/au0828-input.c

index 39ddf3c4fdfe9856aa36b11dd4239276e4a70782..590f99d02c93a07f4c0b81b9ef23169c9374f76e 100644 (file)
 #include <linux/slab.h>
 #include <media/rc-core.h>
 
+static int disable_ir;
+module_param(disable_ir,        int, 0444);
+MODULE_PARM_DESC(disable_ir, "disable infrared remote support");
+
 #include "au0828.h"
 
 struct au0828_rc {
@@ -271,7 +275,7 @@ int au0828_rc_register(struct au0828_dev *dev)
        int err = -ENOMEM;
        u16 i2c_rc_dev_addr = 0;
 
-       if (!dev->board.has_ir_i2c)
+       if (!dev->board.has_ir_i2c || disable_ir)
                return 0;
 
        i2c_rc_dev_addr = au0828_probe_i2c_ir(dev);
This page took 0.025722 seconds and 5 git commands to generate.