summaryrefslogtreecommitdiff
path: root/drivers/staging
diff options
context:
space:
mode:
authorJarod Wilson <jarod@redhat.com>2011-03-24 16:43:45 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-05-20 09:27:39 -0300
commit990528ebe7b7f07f67e29e66700297b10557a706 (patch)
treeb5d64adb69336991bc66f6bee78502ec6f7e5e79 /drivers/staging
parent68a49a4a3dc9354b6daa24dd87e4e246b6da3c13 (diff)
[media] lirc_sasem: key debug spew off debug modparam
Signed-off-by: Jarod Wilson <jarod@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/lirc/lirc_sasem.c13
1 files changed, 7 insertions, 6 deletions
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