V4L/DVB: cx88: Let the user disable IR support
authorJean Delvare <khali@linux-fr.org>
Mon, 28 Jun 2010 15:59:49 +0000 (12:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 2 Aug 2010 18:32:41 +0000 (15:32 -0300)
It might be useful to be able to disable the IR support, either for
debugging purposes, or just for users who know they won't use the IR
remote control anyway. On many cards, IR support requires expensive
polling/sampling which is better avoided if never needed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx88/cx88-cards.c

index 658ee90db5a4723f0390768dce0d160fbf5a4d03..e8416b76da6708fd27451e5674597fce91dc963a 100644 (file)
@@ -45,6 +45,10 @@ static unsigned int latency = UNSET;
 module_param(latency,int,0444);
 MODULE_PARM_DESC(latency,"pci latency timer");
 
+static int disable_ir;
+module_param(disable_ir, int, 0444);
+MODULE_PARM_DESC(latency, "Disable IR support");
+
 #define info_printk(core, fmt, arg...) \
        printk(KERN_INFO "%s: " fmt, core->name , ## arg)
 
@@ -3498,8 +3502,10 @@ struct cx88_core *cx88_core_create(struct pci_dev *pci, int nr)
        }
 
        cx88_card_setup(core);
-       cx88_i2c_init_ir(core);
-       cx88_ir_init(core, pci);
+       if (!disable_ir) {
+               cx88_i2c_init_ir(core);
+               cx88_ir_init(core, pci);
+       }
 
        return core;
 }