diff mbox

V4L/DVB: cx88: Add module parameter to disable IR

Message ID 1290062581.41867.321546213719.1.gpush@pororo (mailing list archive)
State Superseded
Headers show

Commit Message

Jeremy Kerr Nov. 18, 2010, 6:43 a.m. UTC
None
diff mbox

Patch

diff --git a/drivers/media/video/cx88/cx88-input.c b/drivers/media/video/cx88/cx88-input.c
index fc777bc..d49af18 100644
--- a/drivers/media/video/cx88/cx88-input.c
+++ b/drivers/media/video/cx88/cx88-input.c
@@ -67,6 +67,10 @@  static int ir_debug;
 module_param(ir_debug, int, 0644);	/* debug level [IR] */
 MODULE_PARM_DESC(ir_debug, "enable debug messages [IR]");
 
+static int ir_disable;
+module_param(ir_disable, int, 0644);
+MODULE_PARM_DESC(ir_disable, "disable IR support");
+
 #define ir_dprintk(fmt, arg...)	if (ir_debug) \
 	printk(KERN_DEBUG "%s IR: " fmt , ir->core->name , ##arg)
 
@@ -244,6 +248,9 @@  int cx88_ir_init(struct cx88_core *core, struct pci_dev *pci)
 				 * used with a full-code IR table
 				 */
 
+	if (ir_disable)
+		return 0;
+
 	ir = kzalloc(sizeof(*ir), GFP_KERNEL);
 	input_dev = input_allocate_device();
 	if (!ir || !input_dev)