From patchwork Wed Apr 28 17:37:29 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 95758 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o3SHbWdQ021152 for ; Wed, 28 Apr 2010 17:37:32 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754016Ab0D1Rhb (ORCPT ); Wed, 28 Apr 2010 13:37:31 -0400 Received: from mx1.redhat.com ([209.132.183.28]:44048 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753349Ab0D1Rhb (ORCPT ); Wed, 28 Apr 2010 13:37:31 -0400 Received: from int-mx05.intmail.prod.int.phx2.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.18]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o3SHbUAN000423 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 28 Apr 2010 13:37:30 -0400 Received: from ihatethathostname.lab.bos.redhat.com (ihatethathostname.lab.bos.redhat.com [10.16.43.238]) by int-mx05.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o3SHbTWB029360 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 28 Apr 2010 13:37:30 -0400 Received: from ihatethathostname.lab.bos.redhat.com (ihatethathostname.lab.bos.redhat.com [127.0.0.1]) by ihatethathostname.lab.bos.redhat.com (8.14.4/8.14.3) with ESMTP id o3SHbTYw014276; Wed, 28 Apr 2010 13:37:29 -0400 Received: (from jarod@localhost) by ihatethathostname.lab.bos.redhat.com (8.14.4/8.14.4/Submit) id o3SHbT26014275; Wed, 28 Apr 2010 13:37:29 -0400 X-Authentication-Warning: ihatethathostname.lab.bos.redhat.com: jarod set sender to jarod@redhat.com using -f Date: Wed, 28 Apr 2010 13:37:29 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: linux-input@vger.kernel.org Subject: [PATCH] IR/imon: minor change_protocol fixups Message-ID: <20100428173729.GA14256@redhat.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-12-10) X-Scanned-By: MIMEDefang 2.67 on 10.5.11.18 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]); Wed, 28 Apr 2010 17:37:33 +0000 (UTC) diff --git a/drivers/media/IR/imon.c b/drivers/media/IR/imon.c index 16e2e7f..6fb3b05 100644 --- a/drivers/media/IR/imon.c +++ b/drivers/media/IR/imon.c @@ -999,7 +999,7 @@ int imon_ir_change_protocol(void *priv, u64 ir_type) unsigned char ir_proto_packet[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x86 }; - if (!(ir_type & ictx->props->allowed_protos)) + if (ir_type && !(ir_type & ictx->props->allowed_protos)) dev_warn(dev, "Looks like you're trying to use an IR protocol " "this device does not support\n"); @@ -1014,12 +1014,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type) break; case IR_TYPE_UNKNOWN: case IR_TYPE_OTHER: - dev_dbg(dev, "Configuring IR receiver for iMON protocol"); - if (pad_stabilize) { - printk(KERN_CONT "\n"); + dev_dbg(dev, "Configuring IR receiver for iMON protocol\n"); + if (pad_stabilize) pad_mouse = true; - } else { - printk(KERN_CONT " (without PAD stabilization)\n"); + else { + dev_dbg(dev, "PAD stabilize functionality disabled\n"); pad_mouse = false; } /* ir_proto_packet[0] = 0x00; // already the default */ @@ -1027,12 +1026,11 @@ int imon_ir_change_protocol(void *priv, u64 ir_type) break; default: dev_warn(dev, "Unsupported IR protocol specified, overriding " - "to iMON IR protocol"); - if (pad_stabilize) { - printk(KERN_CONT "\n"); + "to iMON IR protocol\n"); + if (pad_stabilize) pad_mouse = true; - } else { - printk(KERN_CONT " (without PAD stabilization)\n"); + else { + dev_dbg(dev, "PAD stabilize functionality disabled\n"); pad_mouse = false; } /* ir_proto_packet[0] = 0x00; // already the default */