From patchwork Thu Mar 24 20:27:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jarod Wilson X-Patchwork-Id: 660371 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 p2OKSDSC008588 for ; Thu, 24 Mar 2011 20:28:13 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934102Ab1CXU1x (ORCPT ); Thu, 24 Mar 2011 16:27:53 -0400 Received: from mx1.redhat.com ([209.132.183.28]:17398 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934100Ab1CXU1v (ORCPT ); Thu, 24 Mar 2011 16:27:51 -0400 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p2OKRpK7018963 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Thu, 24 Mar 2011 16:27:51 -0400 Received: from xavier.bos.redhat.com (xavier.bos.redhat.com [10.16.16.50]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id p2OKRpTW030559; Thu, 24 Mar 2011 16:27:51 -0400 From: Jarod Wilson To: linux-media@vger.kernel.org Cc: Jarod Wilson Subject: [PATCH] lirc_sasem: key debug spew off debug modparam Date: Thu, 24 Mar 2011 16:27:49 -0400 Message-Id: <1300998469-5855-1-git-send-email-jarod@redhat.com> X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11 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.6 (demeter1.kernel.org [140.211.167.41]); Thu, 24 Mar 2011 20:28:13 +0000 (UTC) diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c index 63a438d..7080cde 100644 --- a/drivers/staging/lirc/lirc_sasem.c +++ b/drivers/staging/lirc/lirc_sasem.c @@ -570,6 +570,7 @@ static void incoming_packet(struct sasem_context *context, unsigned char *buf = urb->transfer_buffer; long ms; struct timeval tv; + int i; if (len != 8) { printk(KERN_WARNING "%s: invalid incoming packet size (%d)\n", @@ -577,12 +578,12 @@ static void incoming_packet(struct sasem_context *context, return; } -#ifdef DEBUG - int i; - for (i = 0; i < 8; ++i) - printk(KERN_INFO "%02x ", buf[i]); - printk(KERN_INFO "\n"); -#endif + if (debug) { + printk(KERN_INFO "Incoming data: "); + for (i = 0; i < 8; ++i) + printk(KERN_CONT "%02x ", buf[i]); + printk(KERN_CONT "\n"); + } /* * Lirc could deal with the repeat code, but we really need to block it