From: Jarod Wilson Date: Thu, 24 Mar 2011 19:43:45 +0000 (-0300) Subject: [media] lirc_sasem: key debug spew off debug modparam X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=990528ebe7b7f07f67e29e66700297b10557a706;p=openwrt%2Fstaging%2Fblogic.git [media] lirc_sasem: key debug spew off debug modparam Signed-off-by: Jarod Wilson Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/lirc/lirc_sasem.c b/drivers/staging/lirc/lirc_sasem.c index 63a438d1c849..7080cdeab5a6 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