From patchwork Thu Nov 18 06:43:01 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jeremy Kerr X-Patchwork-Id: 335161 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id oAI6hHVq026925 for ; Thu, 18 Nov 2010 06:43:17 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502Ab0KRGnP (ORCPT ); Thu, 18 Nov 2010 01:43:15 -0500 Received: from ozlabs.org ([203.10.76.45]:55501 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751569Ab0KRGnP (ORCPT ); Thu, 18 Nov 2010 01:43:15 -0500 Received: by ozlabs.org (Postfix, from userid 1023) id 4F4FFB71B1; Thu, 18 Nov 2010 17:43:14 +1100 (EST) MIME-Version: 1.0 Subject: [PATCH] V4L/DVB: cx88: Add module parameter to disable IR Message-Id: <1290062581.41867.321546213719.1.gpush@pororo> To: From: Jeremy Kerr Date: Thu, 18 Nov 2010 14:43:01 +0800 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter1.kernel.org [140.211.167.41]); Thu, 18 Nov 2010 06:43:17 +0000 (UTC) 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)